mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-01-27 14:03:36 +03:00
malloc-fail: Fix another memory leak in xmlSchemaBucketCreate
Found with libFuzzer, see #344.
This commit is contained in:
parent
31844c74df
commit
260d6b8d77
@ -3755,7 +3755,10 @@ xmlSchemaBucketCreate(xmlSchemaParserCtxtPtr pctxt,
|
||||
return(NULL);
|
||||
}
|
||||
}
|
||||
xmlSchemaItemListAdd(mainSchema->includes, ret);
|
||||
if (xmlSchemaItemListAdd(mainSchema->includes, ret) < 0) {
|
||||
xmlSchemaBucketFree(ret);
|
||||
return(NULL);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Add to list of all buckets; this is used for lookup
|
||||
|
Loading…
x
Reference in New Issue
Block a user