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 {
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.