mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
Martin Stoilov pointed out a potential leak in xmlCreateMemoryParserCtxt
* parser.c: Martin Stoilov pointed out a potential leak in xmlCreateMemoryParserCtxt Daniel
This commit is contained in:
@ -1,3 +1,8 @@
|
||||
Tue Nov 19 09:09:04 CET 2002 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* parser.c: Martin Stoilov pointed out a potential leak in
|
||||
xmlCreateMemoryParserCtxt
|
||||
|
||||
Mon Nov 18 16:05:51 CET 2002 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* HTMLparser.c: fixed bug #98879 a corner case when 0 is
|
||||
|
6
parser.c
6
parser.c
@ -10483,10 +10483,14 @@ xmlCreateMemoryParserCtxt(const char *buffer, int size) {
|
||||
return(NULL);
|
||||
|
||||
buf = xmlParserInputBufferCreateMem(buffer, size, XML_CHAR_ENCODING_NONE);
|
||||
if (buf == NULL) return(NULL);
|
||||
if (buf == NULL) {
|
||||
xmlFreeParserCtxt(ctxt);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
input = xmlNewInputStream(ctxt);
|
||||
if (input == NULL) {
|
||||
xmlFreeParserInputBuffer(buf);
|
||||
xmlFreeParserCtxt(ctxt);
|
||||
return(NULL);
|
||||
}
|
||||
|
Reference in New Issue
Block a user