diff options
author | paul <paul> | 2006-06-15 12:25:55 +0000 |
---|---|---|
committer | paul <paul> | 2006-06-15 12:25:55 +0000 |
commit | 50831caf3d37ac4971d173102d91f3634d2b6f70 (patch) | |
tree | 7ddbb517402081ad03064f69089e8ce7018a6569 /lib/command.c | |
parent | 47f8ab432bf03f2632d6c3755895b24a56b58db1 (diff) | |
download | quagga-50831caf3d37ac4971d173102d91f3634d2b6f70.tar.bz2 quagga-50831caf3d37ac4971d173102d91f3634d2b6f70.tar.xz |
[lib] Fix vector leak in error path in command.c, CID #38
2006-06-15 Paul Jakma <paul.jakma@sun.com>
* command.c: (cmd_describe_command_real) Fix leak, CID #38.
Diffstat (limited to 'lib/command.c')
-rw-r--r-- | lib/command.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/command.c b/lib/command.c index 07297eff..b8d60f2e 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1,5 +1,5 @@ /* - $Id: command.c,v 1.53 2006/05/12 23:24:09 paul Exp $ + $Id: command.c,v 1.54 2006/06/15 12:25:55 paul Exp $ Command interpreter routine for virtual terminal [aka TeletYpe] Copyright (C) 1997, 98, 99 Kunihiro Ishiguro @@ -1629,12 +1629,14 @@ cmd_describe_command_real (vector vline, struct vty *vty, int *status) if ((ret = is_cmd_ambiguous (command, cmd_vector, i, match)) == 1) { vector_free (cmd_vector); + vector_free (matchvec); *status = CMD_ERR_AMBIGUOUS; return NULL; } else if (ret == 2) { vector_free (cmd_vector); + vector_free (matchvec); *status = CMD_ERR_NO_MATCH; return NULL; } |