mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virsh.c: avoid leak on OOM error path
* tools/virsh.c (cmdCPUBaseline): Also free "buffer" and "list" upon OOM.
This commit is contained in:
@@ -7139,6 +7139,8 @@ cleanup:
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
no_memory:
|
no_memory:
|
||||||
|
VIR_FREE(list);
|
||||||
|
VIR_FREE(buffer);
|
||||||
vshError(ctl, "%s", _("Out of memory"));
|
vshError(ctl, "%s", _("Out of memory"));
|
||||||
ret = FALSE;
|
ret = FALSE;
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user