Fix CID 1492295: explicit null dereferenced (due to previous commit).
authorwwp <subscript@free.fr>
Thu, 30 Sep 2021 09:09:35 +0000 (11:09 +0200)
committerwwp <subscript@free.fr>
Thu, 30 Sep 2021 09:09:35 +0000 (11:09 +0200)
src/plugins/archive/libarchive_archive.c

index c6366dde732a5b74d4b162abd0a9c3d582ba0242..66ebc03260c45d990407753d9cff10a3e2488d28 100644 (file)
@@ -100,8 +100,10 @@ void archive_free_archived_files() {
     GSList* l = NULL;
    
     for (l = msg_trash_list; l; l = g_slist_next(l)) {
     GSList* l = NULL;
    
     for (l = msg_trash_list; l; l = g_slist_next(l)) {
-        gchar *name = folder_item_get_name(mt->item);
+        gchar *name;
+
         mt = (MsgTrash *) l->data;
         mt = (MsgTrash *) l->data;
+        name = folder_item_get_name(mt->item);
         debug_print("Trashing messages in folder: %s\n", 
                 name);
         g_free(name);
         debug_print("Trashing messages in folder: %s\n", 
                 name);
         g_free(name);