mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-07 12:17:18 +00:00
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 deb86ee9123ef47dce80dd77a9bc583f2b0214db)
This commit is contained in:
parent
5fa7db63a7
commit
5fdccc8557
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user