mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-31 06:50:06 +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:
parent
f8852184a1
commit
d18f9c1102
@ -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])
|
||||
|
Loading…
x
Reference in New Issue
Block a user