summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-02-25 05:02:20 +0100
committerZenWalker <[email protected]>2019-03-06 23:54:04 +0100
commit726144259f649e80ae1221e065ee8d9706b86616 (patch)
tree0bf7318a85249e6f55f728b1fc3e4bd01b4594c5
parentf6a5738c892207534bc946faa8f6b398b54395a9 (diff)
downloadcaja-726144259f649e80ae1221e065ee8d9706b86616.tar.bz2
caja-726144259f649e80ae1221e065ee8d9706b86616.tar.xz
caja-file: Fix use of memory after it is freed
to avoid warning with Clang Analyzer
-rw-r--r--libcaja-private/caja-file.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/libcaja-private/caja-file.c b/libcaja-private/caja-file.c
index 01e9db83..23e619f1 100644
--- a/libcaja-private/caja-file.c
+++ b/libcaja-private/caja-file.c
@@ -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;
@@ -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