mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-31 06:50:06 +03:00
Fix memory leak when doc is NULL
* xmlschemas.c: fix memory leak when doc is NULL
This commit is contained in:
parent
aa422d9254
commit
410d2c4e90
@ -10531,9 +10531,9 @@ doc_load:
|
||||
/* Parse from memory buffer. */
|
||||
doc = xmlCtxtReadMemory(parserCtxt, schemaBuffer, schemaBufferLen,
|
||||
NULL, NULL, SCHEMAS_PARSE_OPTIONS);
|
||||
schemaLocation = xmlStrdup(BAD_CAST "in_memory_buffer");
|
||||
schemaLocation = BAD_CAST "in_memory_buffer";
|
||||
if (doc != NULL)
|
||||
doc->URL = schemaLocation;
|
||||
doc->URL = xmlStrdup(schemaLocation);
|
||||
}
|
||||
/*
|
||||
* For <import>:
|
||||
|
Loading…
x
Reference in New Issue
Block a user