1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2026-01-26 21:41:34 +03:00

Fix memory leak of prefix in xmlTextWriterStartElementNS()

This commit is contained in:
Niels Dossche
2025-09-04 21:13:24 +02:00
committed by Iván Chavero
parent bcaae46a31
commit 98194640b8

View File

@@ -1051,6 +1051,7 @@ xmlTextWriterStartElementNS(xmlTextWriter *writer,
if (p->uri == 0) {
xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
"xmlTextWriterStartElementNS : out of memory!\n");
xmlFree(p->prefix);
xmlFree(p);
return -1;
}