1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-07-12 01:41:46 +03:00

patch from Charles Bozeman fixing a memory leak in

* libexslt/date.c: patch from Charles Bozeman fixing a memory
  leak in exsltDateDurationFunction pointed out by Bernard Brinkhus
* python/tests/exslt.py: trouble with mem debug in that specific
  test...
Daniel
This commit is contained in:
Daniel Veillard
2002-11-23 13:48:38 +00:00
parent 31c9ff31c8
commit 645c2e421a
3 changed files with 18 additions and 7 deletions

View File

@ -1,3 +1,10 @@
Sat Nov 23 14:46:06 CET 2002 Daniel Veillard <daniel@veillard.com>
* libexslt/date.c: patch from Charles Bozeman fixing a memory
leak in exsltDateDurationFunction pointed out by Bernard Brinkhus
* python/tests/exslt.py: trouble with mem debug in that specific
test...
Sat Nov 23 12:33:58 CET 2002 Daniel Veillard <daniel@veillard.com> Sat Nov 23 12:33:58 CET 2002 Daniel Veillard <daniel@veillard.com>
* libxslt/xsltInternals.h: Alexey Efimov reported a portability * libxslt/xsltInternals.h: Alexey Efimov reported a portability

View File

@ -3432,6 +3432,9 @@ exsltDateDurationFunction (xmlXPathParserContextPtr ctxt, int nargs) {
ret = exsltDateDuration(number); ret = exsltDateDuration(number);
if (number != NULL)
xmlFree(number);
if (ret == NULL) if (ret == NULL)
xmlXPathReturnEmptyString(ctxt); xmlXPathReturnEmptyString(ctxt);
else else

View File

@ -4,7 +4,7 @@ import libxml2
import libxslt import libxslt
# Memory debug specific # Memory debug specific
libxml2.debugMemory(1) #libxml2.debugMemory(1)
styledoc = libxml2.parseDoc( styledoc = libxml2.parseDoc(
@ -49,9 +49,10 @@ if stringval != expect:
sys.exit(255) sys.exit(255)
# Memory debug specific # Memory debug specific
libxslt.cleanup() #libxslt.cleanup()
if libxml2.debugMemory(1) == 0: #if libxml2.debugMemory(1) == 0:
print "OK" # print "OK"
else: #else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1)) # print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory() # libxml2.dumpMemory()
print "OK"