* src/mh.c
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Sun, 1 Sep 2002 11:28:53 +0000 (11:28 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Sun, 1 Sep 2002 11:28:53 +0000 (11:28 +0000)
plug memleak related to one Martin Kluge found

ChangeLog.claws
configure.in
src/mh.c

index 846d14c0b7257d6ee6a5ec4f16883460f8474d3b..31366f943a88b466686911833e0dc8fd2a6a64be 100644 (file)
@@ -1,3 +1,8 @@
+2002-0901 [alfons]     0.8.2claws18
+
+       * src/mh.c
+               plug memleak related to one Martin Kluge found
+
 2002-08-31 [paul]      0.8.2claws17
 
        * sync with 0.8.2cvs6
index 898f8552b8b7e68e8c3c6853879d4978caf2edd8..dadda72742aed081cda72925b795faef5283b957 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=8
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws17
+EXTRA_VERSION=claws18
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 4dd1ee7de9fc3c137b68e61eb31a2bd073501904..865ed85488c831810b8a74af4908303e3b7f6a78 100644 (file)
--- a/src/mh.c
+++ b/src/mh.c
@@ -456,17 +456,13 @@ static gint mh_do_move(Folder *folder, FolderItem *dest, MsgInfo *msginfo)
        prefs = dest->prefs;
 
        destfile = mh_get_new_msg_filename(dest);
-       g_return_val_if_fail(destfile != NULL, -1);
+       if (!destfile) return -1;
 
+       srcfile = procmsg_get_message_file(msginfo);
+       
        debug_print("Moving message %s%c%d to %s ...\n",
                    msginfo->folder->path, G_DIR_SEPARATOR,
                    msginfo->msgnum, dest->path);
-       srcfile = procmsg_get_message_file(msginfo);
-
-       destfile = mh_get_new_msg_filename(dest);
-       if(!destfile) return -1;
-
-       srcfile = procmsg_get_message_file(msginfo);
 
        if (move_file(srcfile, destfile, FALSE) < 0) {
                g_free(srcfile);
@@ -560,10 +556,8 @@ static gint mh_do_move_msgs_with_dest(Folder *folder, FolderItem *dest,
                            msginfo->msgnum, dest->path);
 
                destfile = mh_get_new_msg_filename(dest);
-               if (!destfile) break;
+               if (!destfile) return -1;
                srcfile = procmsg_get_message_file(msginfo);
-               destfile = mh_get_new_msg_filename(dest);
-               if(!destfile) return -1;
 
                if (move_file(srcfile, destfile, FALSE) < 0) {
                        g_free(srcfile);