mirror of
https://github.com/postgres/postgres.git
synced 2025-06-08 22:02:03 +03:00
Fix transaction-lifespan memory leak in xpath(). Report by Matt Magoffin,
fix by Kris Jurka.
This commit is contained in:
parent
1e797d29c3
commit
c5f4b98fae
@ -7,7 +7,7 @@
|
|||||||
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.74 2008/05/12 00:00:51 alvherre Exp $
|
* $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.75 2008/07/03 00:04:24 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -3160,6 +3160,7 @@ xml_xmlnodetoxmltype(xmlNodePtr cur)
|
|||||||
{
|
{
|
||||||
str = xmlXPathCastNodeToString(cur);
|
str = xmlXPathCastNodeToString(cur);
|
||||||
result = (xmltype *) cstring_to_text((char *) str);
|
result = (xmltype *) cstring_to_text((char *) str);
|
||||||
|
xmlFree(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user