1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-02-05 05:47:00 +03:00

Fix memory leak in runtest.c

This commit is contained in:
Nick Wellnhofer 2020-08-16 22:22:57 +02:00
parent 2b4769a6bd
commit e1c2d0adf0

View File

@ -2108,16 +2108,16 @@ errParseTest(const char *filename, const char *result, const char *err,
xmlDocDumpMemory(doc, (xmlChar **) &base, &size);
}
res = compareFileMem(result, base, size);
if (res != 0) {
fprintf(stderr, "Result for %s failed in %s\n", filename, result);
return(-1);
}
}
if (doc != NULL) {
if (base != NULL)
xmlFree((char *)base);
xmlFreeDoc(doc);
}
if (res != 0) {
fprintf(stderr, "Result for %s failed in %s\n", filename, result);
return(-1);
}
if (err != NULL) {
res = compareFileMem(err, testErrors, testErrorsSize);
if (res != 0) {