Skip to content

Commit 1bbf870

Browse files
committed
It turns out the LIBXML_TEST_VERSION macro calls xmlInitParser().
Therefore we must xmlCleanupParser(), or we risk leaving behind dangling pointers to whatever memory context is current when xml_init() is called. This seems to fix bug #3860, though we might still want the more invasive solution being worked on by Alvaro.
1 parent 5217663 commit 1bbf870

File tree

1 file changed

+4
-1
lines changed
  • src/backend/utils/adt

1 file changed

+4
-1
lines changed

src/backend/utils/adt/xml.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.66 2008/01/12 10:50:03 neilc Exp $
10+
* $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.67 2008/01/12 21:14:08 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -958,6 +958,9 @@ xml_init(void)
958958
/* Check library compatibility */
959959
LIBXML_TEST_VERSION;
960960

961+
/* The above calls xmlInitParser(); must clean up dangling pointers */
962+
xmlCleanupParser();
963+
961964
first_time = false;
962965
}
963966
else

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy