Author: turnstep
Date: Thu Mar 26 09:16:10 2009
New Revision: 12635
Modified:
DBD-Pg/trunk/dbdimp.c
Log:
Mortalize those temporary strings to prevent memory leaks.
Modified: DBD-Pg/trunk/dbdimp.c
==============================================================================
--- DBD-Pg/trunk/dbdimp.c (original)
+++ DBD-Pg/trunk/dbdimp.c Thu Mar 26 09:16:10 2009
@@ -2574,9 +2574,9 @@
}
else {
if (1 == coltype->svtype)
- av_push(currentav,
newSViv(SvIV(newSVpvn(string,section_size))));
+ av_push(currentav,
newSViv(SvIV(sv_2mortal(newSVpvn(string,section_size)))));
else if (2 == coltype->svtype)
- av_push(currentav,
newSVnv(SvNV(newSVpvn(string,section_size))));
+ av_push(currentav,
newSVnv(SvNV(sv_2mortal(newSVpvn(string,section_size)))));
else if (3 == coltype->svtype)
av_push(currentav, newSViv('t' ==
*string ? 1 : 0));
else {