提交 5fdccc85 编写于 作者: M Michal Privoznik 提交者: Eric Blake

virsh: Call virDomainFree in cmdDomFSTrim

https://bugzilla.redhat.com/show_bug.cgi?id=928197

The virsh domfstrim command was not freeing allocated domain,
leaving leaked references behind.
(cherry picked from commit deb86ee9)
上级 5fa7db63
......@@ -10094,7 +10094,7 @@ cmdDomFSTrim(vshControl *ctl, const vshCmd *cmd)
unsigned int flags = 0;
if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
goto cleanup;
return ret;
if (vshCommandOptULongLong(cmd, "minimum", &minimum) < 0) {
vshError(ctl, _("Unable to parse integer parameter minimum"));
......@@ -10112,6 +10112,7 @@ cmdDomFSTrim(vshControl *ctl, const vshCmd *cmd)
ret = true;
cleanup:
virDomainFree(dom);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册