Skip to content

Commit

Permalink
caja-file: Fix use of memory after it is freed
Browse files Browse the repository at this point in the history
to avoid warning with Clang Analyzer
  • Loading branch information
sc0w committed Mar 6, 2019
1 parent 0bd2d81 commit 6e6c9c6
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions libcaja-private/caja-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -8299,10 +8299,10 @@ file_list_file_ready_callback (CajaFile *file,

void
caja_file_list_call_when_ready (GList *file_list,
CajaFileAttributes attributes,
CajaFileListHandle **handle,
CajaFileListCallback callback,
gpointer callback_data)
CajaFileAttributes attributes,
CajaFileListHandle **handle,
CajaFileListCallback callback,
gpointer callback_data)
{
GList *l;
FileListReadyData *data;
Expand All @@ -8323,11 +8323,17 @@ caja_file_list_call_when_ready (GList *file_list,
file = CAJA_FILE (l->data);
/* Need to do this here, as the list can be modified by this call */
l = l->next;

caja_file_call_when_ready (file,
attributes,
file_list_file_ready_callback,
data);
attributes,
file_list_file_ready_callback,
data);

data = file_list_ready_data_new
(file_list, callback, callback_data);
}

file_list_ready_data_free (data);
}

void
Expand Down

0 comments on commit 6e6c9c6

Please sign in to comment.