Re: BUG #1739: memory leak in pl/perl with spi_exec_query
От | Tom Lane |
---|---|
Тема | Re: BUG #1739: memory leak in pl/perl with spi_exec_query |
Дата | |
Msg-id | 20421.1120427861@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | BUG #1739: memory leak in pl/perl with spi_exec_query ("Jean-Max Reymond" <jmreymond@ckr-solutions.com>) |
Ответы |
Re: BUG #1739: memory leak in pl/perl with spi_exec_query
|
Список | pgsql-bugs |
"Jean-Max Reymond" <jmreymond@ckr-solutions.com> writes: > So, spi_exec_query allocates memory but this memory is never released until > the end of the stored procedure. Ah, found it. regards, tom lane Index: plperl.c =================================================================== RCS file: /cvsroot/pgsql/src/pl/plperl/plperl.c,v retrieving revision 1.67.4.1 diff -c -r1.67.4.1 plperl.c *** plperl.c 23 May 2005 02:02:52 -0000 1.67.4.1 --- plperl.c 3 Jul 2005 21:55:03 -0000 *************** *** 1419,1424 **** --- 1419,1426 ---- Int32GetDatum(tupdesc->attrs[i]->atttypmod))); hv_store(hv, attname, namelen, newSVpv(outputstr, 0), 0); + + pfree(outputstr); } return newRV_noinc((SV *) hv);
В списке pgsql-bugs по дате отправления: