mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu_process: Resolve Coverity RESOURCE_LEAK
If virSecurityManagerClearSocketLabel() fails, 'agent' won't be freed before jumping to cleanup. Signed-off-by: Wang Rui <moon.wangrui@huawei.com>
This commit is contained in:
parent
3bd46c8174
commit
4f2ad084bc
@ -264,6 +264,7 @@ qemuConnectAgent(virQEMUDriverPtr driver, virDomainObjPtr vm)
|
|||||||
vm->def) < 0) {
|
vm->def) < 0) {
|
||||||
VIR_ERROR(_("Failed to clear security context for agent for %s"),
|
VIR_ERROR(_("Failed to clear security context for agent for %s"),
|
||||||
vm->def->name);
|
vm->def->name);
|
||||||
|
qemuAgentClose(agent);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user