1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-24 21:33:51 +03:00

malloc-fail: Fix memory leak in xmlSAX2StartElementNs

Found with libFuzzer, see #344.
This commit is contained in:
Nick Wellnhofer 2023-02-14 18:10:14 +01:00
parent 9fa1b228a5
commit cb4334b7ab

1
SAX2.c
View File

@ -2284,6 +2284,7 @@ xmlSAX2StartElementNs(void *ctx,
ret->name = lname;
if (ret->name == NULL) {
xmlSAX2ErrMemory(ctxt, "xmlSAX2StartElementNs");
xmlFree(ret);
return;
}
}