mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
vshCommandParse: placate coverity
There is no real leak here, but Coverity-Prevent thinks there is. It does not see that while there are four ways to return from vshCommandGetToken with VSH_TK_END, none of them results in allocation of a result. * tools/virsh.c (vshCommandParse): Add a (currently) useless VIR_FREE, to ensure that we never leak when vshCommandGetToken returns VSH_TK_END.
This commit is contained in:
parent
7ac2787019
commit
7c5735dc2a
@ -8222,8 +8222,10 @@ vshCommandParse(vshControl *ctl, char *cmdstr)
|
||||
|
||||
str = end;
|
||||
|
||||
if (tk == VSH_TK_END)
|
||||
if (tk == VSH_TK_END) {
|
||||
VIR_FREE(tkdata);
|
||||
break;
|
||||
}
|
||||
if (tk == VSH_TK_ERROR)
|
||||
goto syntaxError;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user