summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-02-25 05:02:20 +0100
committerPablo Barciela <[email protected]>2019-03-06 23:57:29 +0100
commit6e6c9c6b456718ba76ecbd2d956f718374ffd3cd (patch)
treeffd785f1f0d618d24024fabc8a6bd7a2d453cc17
parent0bd2d81dac01922ee0b6afaf3fe8431f93182f3b (diff)
downloadcaja-6e6c9c6b456718ba76ecbd2d956f718374ffd3cd.tar.bz2
caja-6e6c9c6b456718ba76ecbd2d956f718374ffd3cd.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