mirror of https://gitee.com/openkylin/libvirt.git
virsh.c: avoid leak on OOM error path
* tools/virsh.c (cmdCPUBaseline): Also free "buffer" and "list" upon OOM.
This commit is contained in:
parent
72919f3d35
commit
27fc6782bc
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue