mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-02-05 05:47:00 +03:00
malloc-fail: Fix memory leak in xmlSchemaBucketCreate
Found with libFuzzer, see #344.
This commit is contained in:
parent
e15838ab54
commit
a5787229e5
@ -3651,12 +3651,12 @@ xmlSchemaBucketCreate(xmlSchemaParserCtxtPtr pctxt,
|
||||
ret->type = type;
|
||||
ret->globals = xmlSchemaItemListCreate();
|
||||
if (ret->globals == NULL) {
|
||||
xmlFree(ret);
|
||||
xmlSchemaBucketFree(ret);
|
||||
return(NULL);
|
||||
}
|
||||
ret->locals = xmlSchemaItemListCreate();
|
||||
if (ret->locals == NULL) {
|
||||
xmlFree(ret);
|
||||
xmlSchemaBucketFree(ret);
|
||||
return(NULL);
|
||||
}
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user