* 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 14f5d3f..e180f6d 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
index 880a93d..256f77c 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 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
index ac720e4..3e0d3f4 100644 (file)
@@ -2704,9 +2704,10 @@ static gint imap_cmd_ok(SockInfo *sock, GPtrArray *argbuf)
                        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;
-               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));