You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by st...@apache.org on 2004/01/29 11:45:15 UTC
cvs commit: modperl-2.0/xs/Apache/RequestIO Apache__RequestIO.h
stas 2004/01/29 02:45:15
Modified: xs/Apache/RequestIO Apache__RequestIO.h
Log:
make sure we don't leak an SV if croak is called
Revision Changes Path
1.42 +1 -3 modperl-2.0/xs/Apache/RequestIO/Apache__RequestIO.h
Index: Apache__RequestIO.h
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/Apache/RequestIO/Apache__RequestIO.h,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -u -r1.41 -r1.42
--- Apache__RequestIO.h 23 Dec 2003 04:04:31 -0000 1.41
+++ Apache__RequestIO.h 29 Jan 2004 10:45:15 -0000 1.42
@@ -95,7 +95,7 @@
/* XXX: we could have an rcfg->sprintf_buffer to reuse this SV
* across requests
*/
- sv = newSV(0);
+ sv = sv_newmortal();
modperl_perl_do_sprintf(aTHX_ sv, items, MARK);
bytes = SvCUR(sv);
@@ -107,8 +107,6 @@
SvPVX(sv), &bytes));
mpxs_output_flush(r, rcfg);
-
- SvREFCNT_dec(sv);
return bytes;
}