X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fff-printf.c;h=769f830e1cd5423e7db5e80831bc090ba67e98b0;hb=7c6b36f4a64753d4877d7f9669c34da6aadc244b;hp=aff49eb24de203606553f18edf4b81ae1da69c68;hpb=2bdb8362f6969384d1c2a4c0ee6bfef5e60e85c5;p=libucw.git diff --git a/lib/ff-printf.c b/lib/ff-printf.c index aff49eb2..769f830e 100644 --- a/lib/ff-printf.c +++ b/lib/ff-printf.c @@ -1,7 +1,7 @@ /* * UCW Library -- Printf on Fastbuf Streams * - * (c) 2002 Martin Mares + * (c) 2002--2005 Martin Mares * * This software may be freely distributed and used according to the terms * of the GNU Lesser General Public License. @@ -24,6 +24,7 @@ vbprintf(struct fastbuf *b, char *msg, va_list args) { va_copy(args2, args); r = vsnprintf(buf, len, msg, args2); + va_end(args2); if (r < 0) len = 256; else if (r < len) @@ -42,6 +43,7 @@ vbprintf(struct fastbuf *b, char *msg, va_list args) buf = alloca(len); va_copy(args2, args); r = vsnprintf(buf, len, msg, args2); + va_end(args2); if (r < 0) len += len; else if (r < len)