0.8.8claws114
[claws.git] / src / procmsg.c
index 11180f2b4033553b48e19fa7afe54e4a6f5903a2..f1cd5a3d7e1d30b117592c60b4295148a952e714 100644 (file)
@@ -1131,6 +1131,8 @@ void procmsg_msginfo_free(MsgInfo *msginfo)
        if (msginfo->refcnt > 0)
                return;
 
+       debug_print("freeing msginfo %d is %s\n", msginfo->msgnum, msginfo->folder ? msginfo->folder->path : "(nil)");
+
        if (msginfo->to_folder) {
                msginfo->to_folder->op_count--;
                folder_item_update(msginfo->to_folder, F_ITEM_UPDATE_MSGCNT);
@@ -1691,7 +1693,7 @@ GSList *procmsg_find_children (MsgInfo *info)
 {
        GSList *children = NULL;
        GSList *all, *cur;
-       
+
        g_return_val_if_fail(info!=NULL, NULL);
        if (info->msgid == NULL)
                return NULL;
@@ -1708,7 +1710,8 @@ GSList *procmsg_find_children (MsgInfo *info)
                if (tmp && tmp != info)
                        procmsg_msginfo_free(tmp);
        }
-       
+       g_slist_free(all);
+
        return children;
 }
 
@@ -1727,6 +1730,7 @@ static void procmsg_update_unread_children(MsgInfo *info, gboolean newly_marked)
                }
                procmsg_msginfo_free(tmp);
        }
+       g_slist_free(children);
 }
 
 /**