mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
Fix memory leak in cmdAttachDisk
When virBufferError is ok in cmdAttachDisk, the latter should 'goto cleanup', instead of returning a false to prevent memory leaking. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
902d62f0d4
commit
461b1c8b7b
@ -661,7 +661,7 @@ cmdAttachDisk(vshControl *ctl, const vshCmd *cmd)
|
||||
|
||||
if (virBufferError(&buf)) {
|
||||
vshPrint(ctl, "%s", _("Failed to allocate XML buffer"));
|
||||
return false;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
xml = virBufferContentAndReset(&buf);
|
||||
|
Loading…
Reference in New Issue
Block a user