mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
util: Resolve resource leak for 'res' in virSetInherit error path.
This commit is contained in:
parent
584cd5c279
commit
4f85cfdfad
@ -387,6 +387,7 @@ virLockSpacePtr virLockSpaceNewPostExecRestart(virJSONValuePtr object)
|
||||
if (virSetInherit(res->fd, false) < 0) {
|
||||
virReportSystemError(errno, "%s",
|
||||
_("Cannot enable close-on-exec flag"));
|
||||
virLockSpaceResourceFree(res);
|
||||
goto error;
|
||||
}
|
||||
if (virJSONValueObjectGetBoolean(child, "lockHeld", &res->lockHeld) < 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user