diff options
| author | David Lamparter <equinox@opensourcerouting.org> | 2017-02-08 15:14:23 +0100 |
|---|---|---|
| committer | David Lamparter <equinox@opensourcerouting.org> | 2017-02-08 16:34:59 +0100 |
| commit | a31ff449a002805a67e1efd2c5a03737a3fa7d72 (patch) | |
| tree | 3173eb7dc922663255fa967b3455754fe34e742a /lib/command.c | |
| parent | dbb5a5552a5a0d6d6fda5c3df983a08ff763c397 (diff) | |
lib: fix some coverity NULL check warnings
Reported-by: Coverity Scan
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/command.c')
| -rw-r--r-- | lib/command.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/command.c b/lib/command.c index cd8f6463e2..6467fb7185 100644 --- a/lib/command.c +++ b/lib/command.c @@ -699,6 +699,8 @@ cmd_complete_command (vector vline, struct vty *vty, int *status) vector_free (comps); comps = NULL; } + else if (initial_comps) + vector_free (initial_comps); // comps should always be null here assert (!comps); @@ -784,6 +786,8 @@ cmd_execute_command_real (vector vline, // if matcher error, return corresponding CMD_ERR if (MATCHER_ERROR(status)) { + if (argv_list) + list_delete (argv_list); switch (status) { case MATCHER_INCOMPLETE: |
