mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
malloc-fail: Fix leak of xmlCharEncodingHandler
Also free handler if its name is NULL. Found with libFuzzer, see #344.
This commit is contained in:
@@ -2822,7 +2822,6 @@ xmlCharEncCloseFunc(xmlCharEncodingHandler *handler) {
|
||||
int i = 0;
|
||||
|
||||
if (handler == NULL) return(-1);
|
||||
if (handler->name == NULL) return(-1);
|
||||
|
||||
for (i = 0; i < (int) NUM_DEFAULT_HANDLERS; i++) {
|
||||
if (handler == &defaultHandlers[i])
|
||||
|
Reference in New Issue
Block a user