]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh.c: avoid leak on OOM error path
authorJim Meyering <meyering@redhat.com>
Fri, 19 Feb 2010 17:03:41 +0000 (18:03 +0100)
committerJim Meyering <meyering@redhat.com>
Fri, 19 Feb 2010 17:32:23 +0000 (18:32 +0100)
* tools/virsh.c (cmdCPUBaseline): Also free "buffer" and "list" upon OOM.

tools/virsh.c

index dd916f300356286eca80b5b248f19c8bb7c0beaf..c8ae9f2d50425d28a6422702723181a721a340e3 100644 (file)
@@ -7139,6 +7139,8 @@ cleanup:
     return ret;
 
 no_memory:
+    VIR_FREE(list);
+    VIR_FREE(buffer);
     vshError(ctl, "%s", _("Out of memory"));
     ret = FALSE;
     return ret;