mirror of
https://github.com/postgres/postgres.git
synced 2025-08-24 09:27:52 +03:00
Fix memory leak in plperl_hash_from_tuple(), per report from Jean-Max Reymond.
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
* ENHANCEMENTS, OR MODIFICATIONS.
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.67.4.1 2005/05/23 02:02:52 neilc Exp $
|
||||
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.67.4.2 2005/07/03 21:56:27 tgl Exp $
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
@@ -1419,6 +1419,8 @@ plperl_hash_from_tuple(HeapTuple tuple, TupleDesc tupdesc)
|
||||
Int32GetDatum(tupdesc->attrs[i]->atttypmod)));
|
||||
|
||||
hv_store(hv, attname, namelen, newSVpv(outputstr, 0), 0);
|
||||
|
||||
pfree(outputstr);
|
||||
}
|
||||
|
||||
return newRV_noinc((SV *) hv);
|
||||
|
Reference in New Issue
Block a user