提交 3cea593f 编写于 作者: N Nikolay Shirokovskiy 提交者: Maxim Nestratov

vz: fix memory leaks in attach/detach functions

Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
上级 91ee31d1
......@@ -1167,6 +1167,7 @@ static int vzDomainAttachDeviceFlags(virDomainPtr domain, const char *xml,
ret = 0;
cleanup:
virDomainDeviceDefFree(dev);
virObjectUnlock(dom);
return ret;
}
......@@ -1208,6 +1209,7 @@ static int vzDomainDetachDeviceFlags(virDomainPtr domain, const char *xml,
ret = 0;
cleanup:
virDomainDeviceDefFree(dev);
virObjectUnlock(dom);
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册