mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-05 12:35:20 +00:00
vsh: Drop useless check for opts != NULL
All our internal *Free() functions are capable of handling NULL. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
449bfcd576
commit
8010997e2c
@ -799,8 +799,7 @@ vshCommandFree(vshCmd *cmd)
|
|||||||
|
|
||||||
c = c->next;
|
c = c->next;
|
||||||
|
|
||||||
if (tmp->opts)
|
vshCommandOptFree(tmp->opts);
|
||||||
vshCommandOptFree(tmp->opts);
|
|
||||||
VIR_FREE(tmp);
|
VIR_FREE(tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1581,8 +1580,7 @@ vshCommandParse(vshControl *ctl, vshCommandParser *parser)
|
|||||||
vshCommandFree(ctl->cmd);
|
vshCommandFree(ctl->cmd);
|
||||||
ctl->cmd = NULL;
|
ctl->cmd = NULL;
|
||||||
}
|
}
|
||||||
if (first)
|
vshCommandOptFree(first);
|
||||||
vshCommandOptFree(first);
|
|
||||||
VIR_FREE(tkdata);
|
VIR_FREE(tkdata);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user