From: Jiri Denemark Date: Tue, 23 Feb 2010 11:01:20 +0000 (+0100) Subject: virsh.c: avoid all leaks in OOM path in cmdCPUBaseline X-Git-Tag: v0.7.7~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dca81d0472e8689d41154089e6d886824d5c4554;p=thirdparty%2Flibvirt.git virsh.c: avoid all leaks in OOM path in cmdCPUBaseline Signed-off-by: Jiri Denemark --- diff --git a/tools/virsh.c b/tools/virsh.c index dc9d44c017..5fdbbe51d0 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -7140,11 +7140,9 @@ cleanup: return ret; no_memory: - VIR_FREE(list); - VIR_FREE(buffer); vshError(ctl, "%s", _("Out of memory")); ret = FALSE; - return ret; + goto cleanup; } /* Common code for the edit / net-edit / pool-edit functions which follow. */