Minor patch to contrib/xml2

Поиск
Список
Период
Сортировка
От John Gray
Тема Minor patch to contrib/xml2
Дата
Msg-id pan.2005.01.09.17.25.00.49968@azuli.co.uk
обсуждение исходный текст
Ответы Re: Minor patch to contrib/xml2  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-patches
Hi all,

The following patch is small, but given the current point in the cycle I
fully understand that it may be held for an 8.0.1 or 8.1. I'm sorry that I
didn't stumble across it sooner...

It fixes a segfault due to the XML parser not being cleared up as required
when the xpath_list function is applied to an invalid document. The change
just ensures that the early exit (on NULL input) from the
pgxml_result_to_text function calls xmlCleanupParser, as the main exit
does.

Regards

John Gray


Index: contrib/xml2/xpath.c
===================================================================
RCS file: /projects/cvsroot/pgsql/contrib/xml2/xpath.c,v
retrieving revision 1.5
diff -c -r1.5 xpath.c
*** contrib/xml2/xpath.c        2 Dec 2004 22:21:12 -0000       1.5
--- contrib/xml2/xpath.c        9 Jan 2005 17:17:06 -0000
***************
*** 582,588 ****
--- 582,591 ----
        text       *xpres;

        if (res == NULL)
+       {
+               xmlCleanupParser();
                return NULL;
+       }
        switch (res->type)
        {
                case XPATH_NODESET:


В списке pgsql-patches по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Romanian translation for 8.0: new file (postgres)
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Translation updates: pt_BR