提交 4f85cfdf 编写于 作者: J John Ferlan 提交者: Ján Tomko

util: Resolve resource leak for 'res' in virSetInherit error path.

上级 584cd5c2
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册