1
0
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:
Osier Yang 2011-06-23 18:15:25 +08:00
parent 6a15cc6b90
commit d61820df98

View File

@ -1122,9 +1122,9 @@ cleanup:
ret = -1;
}
closelog:
VIR_FREE(buf);
closelog:
if (VIR_CLOSE(logfd) < 0) {
char ebuf[1024];
VIR_WARN("Unable to close logfile: %s",