* src/imap.c
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Tue, 29 Apr 2003 23:40:12 +0000 (23:40 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Tue, 29 Apr 2003 23:40:12 +0000 (23:40 +0000)
fix a leak found while browsing Martin Kluge's
valgrind log (Claws only)

ChangeLog.claws
configure.ac
src/imap.c

index 14f5d3faf9fe4e77f40e1c284f6489728bd8a4a5..e180f6d4bb6115087186892151b3edfa1b840cfd 100644 (file)
@@ -1,3 +1,9 @@
+2003-05-01 [alfons]    0.8.11claws124
+
+       * src/imap.c
+               fix a leak found while browsing Martin Kluge's 
+               valgrind log (Claws only)
+
 2003-04-29 [darko]     0.8.11claws123
 
        * src/gtk/gtkstext.h
 2003-04-29 [darko]     0.8.11claws123
 
        * src/gtk/gtkstext.h
index 880a93dd58d5a26729dc485bb8a0119bd66f3f1e..256f77c711c4b18459e848552619101fa4049cd1 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws123
+EXTRA_VERSION=claws124
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index ac720e433bfa1bf2a6055ba44ea7491b92adff18..3e0d3f45a0ef316377af735ae72d389c4b5e148a 100644 (file)
@@ -2704,9 +2704,10 @@ static gint imap_cmd_ok(SockInfo *sock, GPtrArray *argbuf)
                        continue;
                }
 
                        continue;
                }
 
-               if (sscanf(buf, "%d %s", &cmd_num, cmd_status) < 2)
+               if (sscanf(buf, "%d %s", &cmd_num, cmd_status) < 2) {
+                       g_free(buf);
                        return IMAP_ERROR;
                        return IMAP_ERROR;
-               else if (cmd_num == imap_cmd_count &&
+               else if (cmd_num == imap_cmd_count &&
                         !strcmp(cmd_status, "OK")) {
                        if (argbuf)
                                g_ptr_array_add(argbuf, g_strdup(buf));
                         !strcmp(cmd_status, "OK")) {
                        if (argbuf)
                                g_ptr_array_add(argbuf, g_strdup(buf));