aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/xml.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils/adt/xml.c')
-rw-r--r--src/backend/utils/adt/xml.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c
index fca92e867d0..18f209489ea 100644
--- a/src/backend/utils/adt/xml.c
+++ b/src/backend/utils/adt/xml.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.90 2009/06/09 22:00:57 petere Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.91 2009/06/10 03:44:35 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1293,7 +1293,9 @@ xml_repalloc(void *ptr, size_t size)
static void
xml_pfree(void *ptr)
{
- pfree(ptr);
+ /* At least some parts of libxml assume xmlFree(NULL) is allowed */
+ if (ptr)
+ pfree(ptr);
}