From: Michal Privoznik Date: Fri, 29 Dec 2017 11:19:47 +0000 (+0100) Subject: vsh: Drop useless check for opts != NULL X-Git-Tag: v4.0.0-rc1~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8010997e2cb0df51a729a17a48511e5394a7e69a;p=thirdparty%2Flibvirt.git vsh: Drop useless check for opts != NULL All our internal *Free() functions are capable of handling NULL. Signed-off-by: Michal Privoznik --- diff --git a/tools/vsh.c b/tools/vsh.c index e878119b98..e38dcec92d 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -799,8 +799,7 @@ vshCommandFree(vshCmd *cmd) c = c->next; - if (tmp->opts) - vshCommandOptFree(tmp->opts); + vshCommandOptFree(tmp->opts); VIR_FREE(tmp); } } @@ -1581,8 +1580,7 @@ vshCommandParse(vshControl *ctl, vshCommandParser *parser) vshCommandFree(ctl->cmd); ctl->cmd = NULL; } - if (first) - vshCommandOptFree(first); + vshCommandOptFree(first); VIR_FREE(tkdata); return false; }