mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
qemuMonitorTextMigrate: avoid leak on OOM-error path
* src/qemu/qemu_monitor_text.c (qemuMonitorTextMigrate): Also free "safedest" buffer when failing.
This commit is contained in:
parent
bc5443f4c6
commit
cff218f353
@ -1149,6 +1149,7 @@ static int qemuMonitorTextMigrate(qemuMonitorPtr mon,
|
||||
if (virBufferError(&extra)) {
|
||||
virBufferFreeAndReset(&extra);
|
||||
virReportOOMError();
|
||||
free(safedest);
|
||||
return -1;
|
||||
}
|
||||
if (virAsprintf(&cmd, "migrate %s\"%s\"", virBufferContentAndReset(&extra), safedest) < 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user