mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
malloc-fail: Fix memory leak in xmlSchemaBucketCreate
Found with libFuzzer, see #344.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
/*
|
||||
|
Reference in New Issue
Block a user