* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.68.2.3 2008/07/03 00:04:34 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.68.2.4 2008/09/16 00:49:49 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifdef USE_LIBXML
xmlChar *version;
- xmlChar *encoding;
int standalone;
int res_code;
#endif
#ifdef USE_LIBXML
if ((res_code = parse_xml_decl((xmlChar *) str,
- &len, &version, &encoding, &standalone)) == 0)
+ &len, &version, NULL, &standalone)) == 0)
{
StringInfoData buf;
}
appendStringInfoString(&buf, str + len);
+ if (version)
+ xmlFree(version);
+ pfree(str);
+
return buf.data;
}