Fix minor memory leak in error condition
authorAndre Heinecke <aheinecke@intevation.de>
Thu, 17 Nov 2016 12:32:06 +0000 (13:32 +0100)
committerAndre Heinecke <aheinecke@intevation.de>
Thu, 17 Nov 2016 12:32:06 +0000 (13:32 +0100)
* src/ommon_indep.c (qp_encode): Free outbuf on error.

src/common_indep.c

index 578169a..ba7b0ed 100644 (file)
@@ -313,6 +313,7 @@ qp_encode (const char *input, size_t inlen, size_t *r_outlen)
         {
           log_error ("Quoted printable too long. Bug.");
           r_outlen = NULL;
+          xfree (outbuf);
           return NULL;
         }
     }