From: John Ferlan Date: Tue, 16 Jun 2020 12:07:09 +0000 (-0400) Subject: conf: Fix memory leak in virCPUDefParseXML X-Git-Tag: v6.5.0-rc1~166 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87386ddcb6ee4d3b959c11c565f118ab9b8d223b;p=thirdparty%2Flibvirt.git conf: Fix memory leak in virCPUDefParseXML Since a08669c31, @tsc is not automatically free'd by any g_auto* method. Found by Coverity. Signed-off-by: John Ferlan Reviewed-by: Peter Krempa --- diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index b40737e407..e1b0a5653f 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -335,7 +335,7 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt, g_autofree char *vendor_id = NULL; g_autofree char *tscScaling = NULL; g_autofree char *migratable = NULL; - virHostCPUTscInfoPtr tsc = NULL; + g_autofree virHostCPUTscInfoPtr tsc = NULL; *cpu = NULL;