diff options
author | paul <paul> | 2006-05-12 23:19:37 +0000 |
---|---|---|
committer | paul <paul> | 2006-05-12 23:19:37 +0000 |
commit | 1de06f5ca3f294dc930c1e6d0c564c6bb68f3886 (patch) | |
tree | b084b30ee23f9098125ba781051f23f5641f5f33 | |
parent | dc82a95921b19bd788dbacbeb06903178e268222 (diff) | |
download | quagga-1de06f5ca3f294dc930c1e6d0c564c6bb68f3886.tar.bz2 quagga-1de06f5ca3f294dc930c1e6d0c564c6bb68f3886.tar.xz |
[lib] CID #37, fix error case leak, cmd_complete_command_real
2006-05-12 Paul Jakma <paul.jakma@sun.com>
* command.c: (cmd_complete_command_real) Fix leak of cmd_vector
in error case, Coverity CID #37.
-rw-r--r-- | lib/ChangeLog | 2 | ||||
-rw-r--r-- | lib/command.c | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog index 64fa8518..dc9999b3 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -2,6 +2,8 @@ * plist.c: (vty_prefix_list_uninstall) Fix potential NULL deref of prefix and typestr strings, Coverity CID #3. + * command.c: (cmd_complete_command_real) Fix leak of cmd_vector + in error case, Coverity CID #37. 2006-03-30 Paul Jakma <paul.jakma@sun.com> diff --git a/lib/command.c b/lib/command.c index 374f93ad..719ffd29 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1785,6 +1785,7 @@ cmd_complete_command_real (vector vline, struct vty *vty, int *status) if (vector_active (vline) == 0) { + vector_free (cmd_vector); *status = CMD_ERR_NO_MATCH; return NULL; } |