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:
parent
2b4769a6bd
commit
e1c2d0adf0
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user