From: Osier Yang Date: Thu, 21 Feb 2013 02:32:15 +0000 (+0800) Subject: qemu: Fix the memory leak X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5c9034bf055d043672be5da8af453e5ddc3906d3;p=people%2Fliuw%2Flibxenctrl-split%2Flibvirt.git qemu: Fix the memory leak Found by John Ferlan (coverity script) --- diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 8299b7969..33fd67d9b 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -1042,6 +1042,7 @@ qemuAddSharedDisk(virQEMUDriverPtr driver, if ((VIR_ALLOC(entry) < 0) || (VIR_ALLOC_N(entry->domains, 1) < 0) || !(entry->domains[0] = strdup(name))) { + qemuSharedDiskEntryFree(entry, NULL); virReportOOMError(); goto cleanup; }