diff options
author | paul <paul> | 2006-05-12 23:19:37 +0000 |
---|---|---|
committer | paul <paul> | 2006-05-12 23:19:37 +0000 |
commit | 149202fd98596d43aba8f717cb508774b96b2e12 (patch) | |
tree | fae01ade69fc4e516f76d045939437482983021a /lib/command.c | |
parent | eb17b8821d5fb61085f509a434a5b477d021d7df (diff) | |
download | quagga-149202fd98596d43aba8f717cb508774b96b2e12.tar.bz2 quagga-149202fd98596d43aba8f717cb508774b96b2e12.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.
Diffstat (limited to 'lib/command.c')
-rw-r--r-- | lib/command.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/command.c b/lib/command.c index ac3516c3..1c277b38 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1,5 +1,5 @@ /* - $Id: command.c,v 1.51 2005/10/26 05:49:54 paul Exp $ + $Id: command.c,v 1.52 2006/05/12 23:19:37 paul Exp $ Command interpreter routine for virtual terminal [aka TeletYpe] Copyright (C) 1997, 98, 99 Kunihiro Ishiguro @@ -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; } |