From: Jérémie Galarneau Date: Thu, 31 Mar 2022 02:59:44 +0000 (-0400) Subject: Tests: validate_xml: leak of xml document instance X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=21699d0f247ea2704113cea4c10b425d9a2f4a19;p=lttng-tools.git Tests: validate_xml: leak of xml document instance `doc` is never free'd when validating an XML. Signed-off-by: Jérémie Galarneau Change-Id: Ia0b541963350aeb6610382fd3226ffd37ab4847e --- diff --git a/tests/utils/xml-utils/validate_xml.cpp b/tests/utils/xml-utils/validate_xml.cpp index b185161b5..f75c8e47b 100644 --- a/tests/utils/xml-utils/validate_xml.cpp +++ b/tests/utils/xml-utils/validate_xml.cpp @@ -145,10 +145,12 @@ static int validate_xml(const char *xml_file_path, struct validation_ctx *ctx) ret = CMD_SUCCESS; end: + if (doc) { + xmlFreeDoc(doc); + } return ret; - - } + int main(int argc, char **argv) { int ret;