virsh.c: avoid leak on OOM error path

* tools/virsh.c (cmdCPUBaseline): Also free "buffer" and "list" upon OOM.
This commit is contained in:
Jim Meyering 2010-02-19 18:03:41 +01:00
parent 72919f3d35
commit 27fc6782bc

View 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;