<<< Date Index >>>     <<< Thread Index >>>

[patch] va_end ap_retry even if it wasn't built



If a valist is started with va_start it should always be va_end'ed.
The list ap_retry will be ended if it is built. But it should really be
ended no matter what.

E

-- 
Erik Hovland
erik@xxxxxxxxxxx
http://hovland.org/
diff -r 72d23f5a353e -r 43929297fa46 muttlib.c
--- a/muttlib.c Thu Dec 04 09:45:27 2008 -0800
+++ b/muttlib.c Thu Dec 04 09:47:53 2008 -0800
@@ -1626,11 +1626,11 @@
     safe_realloc (&buf->data, buf->dsize);
     buf->dptr = buf->data + doff;
     len = vsnprintf (buf->dptr, len, fmt, ap_retry);
-    va_end (ap_retry);
   }
   if (len > 0)
     buf->dptr += len;
 
+  va_end (ap_retry);
   va_end (ap);
   
   return len;