All our internal *Free() functions are capable of handling NULL.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
vshCmd *clast = NULL;
vshCmdOpt *first = NULL;
- if (ctl->cmd) {
- vshCommandFree(ctl->cmd);
- ctl->cmd = NULL;
- }
+ vshCommandFree(ctl->cmd);
+ ctl->cmd = NULL;
while (1) {
vshCmdOpt *last = NULL;
return true;
syntaxError:
- if (ctl->cmd) {
- vshCommandFree(ctl->cmd);
- ctl->cmd = NULL;
- }
+ vshCommandFree(ctl->cmd);
+ ctl->cmd = NULL;
vshCommandOptFree(first);
VIR_FREE(tkdata);
return false;