mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
qemu: fix memory leak in opening log file
The qemuDomainLogContextNew method leaks the "logfile" path on the non-virtlogd code path. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
2b8d0d44b9
commit
0eafe9955b
@ -2360,13 +2360,15 @@ qemuDomainLogContextPtr qemuDomainLogContextNew(virQEMUDriverPtr driver,
|
||||
}
|
||||
}
|
||||
|
||||
cleanup:
|
||||
virObjectUnref(cfg);
|
||||
VIR_FREE(logfile);
|
||||
return ctxt;
|
||||
|
||||
error:
|
||||
virObjectUnref(cfg);
|
||||
qemuDomainLogContextFree(ctxt);
|
||||
return NULL;
|
||||
ctxt = NULL;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user