Subject: Memory leak in unquoted print
Message-ID: <Pine.LNX.4.21.
0103200958180.1538-100000@marmot.rim.canoe.ca>
p4raw-id: //depot/perl@9273
SV *sv = newSVpvn("",0);
char *s;
STRLEN len;
+ SSize_t wrote;
#ifdef NEED_VA_COPY
va_list apc;
Perl_va_copy(ap, apc);
sv_vcatpvf(sv, fmt, &ap);
#endif
s = SvPV(sv,len);
- return PerlIO_write(f,s,len);
+ wrote = PerlIO_write(f,s,len);
+ SvREFCNT_dec(sv);
+ return wrote;
}
#undef PerlIO_printf