cli : coverity fix in cli-rl.c
This patch fixes CID 1395248. Issue : Resource leak updates: bz#789278 Change-Id: I2fd4e36ac2c2a034e56883436abfc5199b095026 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
This commit is contained in:
parent
07cb6a4865
commit
c1f0409822
@ -281,11 +281,9 @@ cli_rl_autocomplete_prepare(struct cli_state *state, const char *text)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!word)
|
||||
if (!word || !token)
|
||||
goto out;
|
||||
|
||||
if (!token)
|
||||
return 0;
|
||||
matches = cli_rl_get_matches(state, word, token);
|
||||
|
||||
state->matches = matches;
|
||||
|
Loading…
x
Reference in New Issue
Block a user