1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

expanded test found and fixed the leak exposed by Microsoft regtests

* runsuite.c: expanded test
* xmlregexp.c: found and fixed the leak exposed by Microsoft regtests
Daniel
This commit is contained in:
Daniel Veillard
2005-07-03 14:35:44 +00:00
parent 3fe1e8a115
commit de0e498b42
3 changed files with 139 additions and 37 deletions

View File

@ -749,7 +749,9 @@ xmlRegFreeAtom(xmlRegAtomPtr atom) {
xmlRegFreeRange(atom->ranges[i]);
if (atom->ranges != NULL)
xmlFree(atom->ranges);
if (atom->type == XML_REGEXP_STRING)
if ((atom->type == XML_REGEXP_STRING) && (atom->valuep != NULL))
xmlFree(atom->valuep);
if ((atom->type == XML_REGEXP_BLOCK_NAME) && (atom->valuep != NULL))
xmlFree(atom->valuep);
xmlFree(atom);
}