Commit 5777ae75 authored by Philip Withnall's avatar Philip Withnall Committed by Daniel Veillard

runtest: Fix a memory leak on parse failure

Coverity issue: #60439

https://bugzilla.gnome.org/show_bug.cgi?id=731990
parent 31aa3815
......@@ -1679,7 +1679,8 @@ saxParseTest(const char *filename, const char *result,
}
if (ret != 0) {
fprintf(stderr, "Failed to parse %s\n", filename);
return(1);
ret = 1;
goto done;
}
#ifdef LIBXML_HTML_ENABLED
if (options & XML_PARSE_HTML) {
......@@ -1701,6 +1702,8 @@ saxParseTest(const char *filename, const char *result,
fprintf(stderr, "Got a difference for %s\n", filename);
ret = 1;
}
done:
if (temp != NULL) {
unlink(temp);
free(temp);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment