diff options
author | Sunny Kumar <sunkumar@redhat.com> | 2018-10-04 19:20:30 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2018-10-05 05:07:18 +0000 |
commit | c1f04098227c17bbebe286871c75524c80eb8b3a (patch) | |
tree | 303b461493b51555f2a57a350821af96e9bc7697 /cli | |
parent | 07cb6a486502fa0f7ea141e7600ec67015383546 (diff) |
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>
Diffstat (limited to 'cli')
-rw-r--r-- | cli/src/cli-rl.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cli/src/cli-rl.c b/cli/src/cli-rl.c index dd0993b8646..7831d0bcb40 100644 --- a/cli/src/cli-rl.c +++ b/cli/src/cli-rl.c @@ -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; |