]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh.c: avoid all leaks in OOM path in cmdCPUBaseline
authorJiri Denemark <jdenemar@redhat.com>
Tue, 23 Feb 2010 11:01:20 +0000 (12:01 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Tue, 23 Feb 2010 12:53:39 +0000 (13:53 +0100)
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
tools/virsh.c

index dc9d44c017e54357767dcc7a232fe638621474f7..5fdbbe51d0ad706f4151299c3873e074be08e5b8 100644 (file)
@@ -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. */