Blame SOURCES/mutt-1.10.1-mutt-1.9.3-1_coverity_187_188_189_190.patch

50ed20
diff -up mutt-1.10.1/sendlib.c.mutt-1.9.3-1_coverity_187_188_189_190 mutt-1.10.1/sendlib.c
50ed20
--- mutt-1.10.1/sendlib.c.mutt-1.9.3-1_coverity_187_188_189_190	2018-11-26 12:34:51.007894823 +0100
50ed20
+++ mutt-1.10.1/sendlib.c	2018-11-26 12:35:08.374143006 +0100
50ed20
@@ -1815,11 +1815,15 @@ static int write_one_header (FILE *fp, i
50ed20
 	      NONULL(pfx), valbuf, max, wraplen));
50ed20
     if (pfx && *pfx)
50ed20
       if (fputs (pfx, fp) == EOF)
50ed20
+      {
50ed20
+        FREE(&valbuf);
50ed20
 	return -1;
50ed20
+      }
50ed20
     if (!(t = strchr (valbuf, ':')))
50ed20
     {
50ed20
       dprint (1, (debugfile, "mwoh: warning: header not in "
50ed20
 		  "'key: value' format!\n"));
50ed20
+      FREE(&valbuf);
50ed20
       return 0;
50ed20
     }
50ed20
     if (print_val (fp, pfx, valbuf, flags, mutt_strlen (pfx)) < 0)
50ed20
@@ -1861,7 +1865,11 @@ static int write_one_header (FILE *fp, i
50ed20
 	      "max width = %d > %d\n",
50ed20
 	      NONULL(pfx), valbuf, max, wraplen));
50ed20
     if (fold_one_header (fp, tagbuf, valbuf, pfx, wraplen, flags) < 0)
50ed20
+    {
50ed20
+      FREE (&tagbuf);
50ed20
+      FREE (&valbuf);
50ed20
       return -1;
50ed20
+    }
50ed20
     FREE (&tagbuf);
50ed20
     FREE (&valbuf);
50ed20
   }