summaryrefslogtreecommitdiffstats
path: root/lib/command.c
diff options
context:
space:
mode:
authorpaul <paul>2006-05-12 23:24:09 +0000
committerpaul <paul>2006-05-12 23:24:09 +0000
commit26dc4bead33a613d00eb3db94dfcd2d065d3fc00 (patch)
treebba51e3ad49fe7b56643a85c8848728658ade6b7 /lib/command.c
parenta6b2e014ede6da6c5de64066cb3ebbc8911c57c0 (diff)
downloadquagga-26dc4bead33a613d00eb3db94dfcd2d065d3fc00.tar.bz2
quagga-26dc4bead33a613d00eb3db94dfcd2d065d3fc00.tar.xz
[lib] CID #55, fix return of freed pointer, cmd_describe_command_real
2006-05-12 Paul Jakma <paul.jakma@sun.com> * command.c: (cmd_describe_command_real) Fix return of freed pointer when no-match, CID #55.
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/command.c b/lib/command.c
index 719ffd29..5c57e79c 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -1693,10 +1693,10 @@ cmd_describe_command_real (vector vline, struct vty *vty, int *status)
{
vector_free (matchvec);
*status = CMD_ERR_NO_MATCH;
+ return NULL;
}
- else
- *status = CMD_SUCCESS;
+ *status = CMD_SUCCESS;
return matchvec;
}