提交 4c832799 编写于 作者: A Alex Jia 提交者: Eric Blake

util: Plug memory leak on virNetDevMacVLanCreateWithVPortProfile() error path

Detected by Coverity. Leak introduced in commit 90074ecf.
Signed-off-by: NAlex Jia <ajia@redhat.com>
Signed-off-by: NEric Blake <eblake@redhat.com>
上级 5483e573
......@@ -582,7 +582,10 @@ create_name:
virNetDevError(VIR_ERR_INTERNAL_ERROR,
_("cannot set bandwidth limits on %s"),
cr_ifname);
rc = -1;
if (withTap)
VIR_FORCE_CLOSE(rc); /* sets rc to -1 */
else
rc = -1;
goto disassociate_exit;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册