]> granicus.if.org Git - neomutt/commitdiff
coverity: fix two minor defects
authorRichard Russon <rich@flatcap.org>
Fri, 14 Jul 2017 12:43:23 +0000 (13:43 +0100)
committerRichard Russon <rich@flatcap.org>
Fri, 14 Jul 2017 12:43:40 +0000 (13:43 +0100)
buffy.c
imap/command.c

diff --git a/buffy.c b/buffy.c
index 346bb99954376f282424e0f81cb0cdcc93a78df3..30f9638e03f2cf6818fdad6b507aea4fb6d07666 100644 (file)
--- a/buffy.c
+++ b/buffy.c
@@ -542,7 +542,10 @@ int mutt_parse_mailboxes(struct Buffer *path, struct Buffer *s,
 
     /* Skip empty tokens. */
     if (!*buf)
+    {
+      FREE(&desc);
       continue;
+    }
 
     /* avoid duplicates */
     p = realpath(buf, f1);
@@ -556,7 +559,10 @@ int mutt_parse_mailboxes(struct Buffer *path, struct Buffer *s,
     }
 
     if (*b)
+    {
+      FREE(&desc);
       continue;
+    }
 
     *b = buffy_new(buf);
 
index c4c9cc34e3fc9d1cae4598bf684158abd436d77f..d0e562b79461b7415f58a6bb29bb00ed1ce79eeb 100644 (file)
@@ -318,7 +318,6 @@ static void cmd_parse_capability(struct ImapData *idata, char *s)
           mutt_bit_set(idata->capabilities, CapabilityAliases[x].value);
           mutt_debug(4, " Found capability \"%s\": %d\n",
                      CapabilityAliases[x].name, CapabilityAliases[x].value);
-          found = true;
           break;
         }
       }