diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index d1e6f9dff5..bde6d941db 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -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; }