mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: Fix memory leak in qemuProcessWaitForMonitor
Move "VIR_FREE(buf) into label "closelog", so that "buf" could be freed before returning.
This commit is contained in:
parent
6a15cc6b90
commit
d61820df98
@ -1122,9 +1122,9 @@ cleanup:
|
|||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
closelog:
|
||||||
VIR_FREE(buf);
|
VIR_FREE(buf);
|
||||||
|
|
||||||
closelog:
|
|
||||||
if (VIR_CLOSE(logfd) < 0) {
|
if (VIR_CLOSE(logfd) < 0) {
|
||||||
char ebuf[1024];
|
char ebuf[1024];
|
||||||
VIR_WARN("Unable to close logfile: %s",
|
VIR_WARN("Unable to close logfile: %s",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user