diff options
-rw-r--r-- | perlio.c | 2 | ||||
-rw-r--r-- | util.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -4913,13 +4913,13 @@ PerlIO_vprintf(PerlIO *f, const char *fmt, va_list ap) va_list apc; Perl_va_copy(ap, apc); sv = vnewSVpvf(fmt, &apc); + va_end(apc); #else sv = vnewSVpvf(fmt, &ap); #endif s = SvPV_const(sv, len); wrote = PerlIO_write(f, s, len); SvREFCNT_dec(sv); - va_end(apc); return wrote; } @@ -4928,6 +4928,7 @@ Perl_my_vsnprintf(char *buffer, const Size_t len, const char *format, va_list ap # else retval = vsprintf(buffer, format, apc); # endif + va_end(apc); #else # ifdef HAS_VSNPRINTF retval = vsnprintf(buffer, len, format, ap); @@ -4935,7 +4936,6 @@ Perl_my_vsnprintf(char *buffer, const Size_t len, const char *format, va_list ap retval = vsprintf(buffer, format, ap); # endif #endif /* #ifdef NEED_VA_COPY */ - va_end(apc); /* vsprintf() shows failure with < 0 */ if (retval < 0 #ifdef HAS_VSNPRINTF |