mirror of https://gitee.com/openkylin/libvirt.git
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.
This commit is contained in:
parent
11e295705a
commit
deb86ee912
|
@ -10040,7 +10040,7 @@ cmdDomFSTrim(vshControl *ctl, const vshCmd *cmd)
|
||||||
unsigned int flags = 0;
|
unsigned int flags = 0;
|
||||||
|
|
||||||
if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
|
if (!(dom = vshCommandOptDomain(ctl, cmd, NULL)))
|
||||||
goto cleanup;
|
return ret;
|
||||||
|
|
||||||
if (vshCommandOptULongLong(cmd, "minimum", &minimum) < 0) {
|
if (vshCommandOptULongLong(cmd, "minimum", &minimum) < 0) {
|
||||||
vshError(ctl, _("Unable to parse integer parameter minimum"));
|
vshError(ctl, _("Unable to parse integer parameter minimum"));
|
||||||
|
@ -10058,6 +10058,7 @@ cmdDomFSTrim(vshControl *ctl, const vshCmd *cmd)
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
|
virDomainFree(dom);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue