mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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) {
|
||||
VIR_ERROR(_("Failed to clear security context for agent for %s"),
|
||||
vm->def->name);
|
||||
qemuAgentClose(agent);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user