Skip to content

Commit

Permalink
Fix use-after-free in infinoted when uploading a document (gobby#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
aburgm committed Feb 28, 2017
1 parent e59c1a4 commit a515e79
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libinfinity/server/infd-directory.c
Original file line number Diff line number Diff line change
Expand Up @@ -3637,6 +3637,7 @@ infd_directory_sync_in_synchronization_complete_cb(InfSession* session,
* tree. */
InfdDirectorySyncIn* sync_in;
InfdDirectory* directory;
const InfdNotePlugin* plugin;
InfdDirectoryPrivate* priv;
InfdDirectoryNode* node;
InfBrowserIter iter;
Expand All @@ -3649,6 +3650,7 @@ infd_directory_sync_in_synchronization_complete_cb(InfSession* session,

sync_in = (InfdDirectorySyncIn*)user_data;
directory = sync_in->directory;
plugin = sync_in->plugin;
priv = INFD_DIRECTORY_PRIVATE(directory);

node = infd_directory_node_new_note(
Expand Down Expand Up @@ -3683,11 +3685,11 @@ infd_directory_sync_in_synchronization_complete_cb(InfSession* session,

if(priv->storage != NULL)
{
ret = sync_in->plugin->session_write(
ret = plugin->session_write(
priv->storage,
session,
path,
sync_in->plugin->user_data,
plugin->user_data,
&error
);
}
Expand Down

0 comments on commit a515e79

Please sign in to comment.