From 5fc60519ede0d34688832e353c35bf1832a4330d Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Fri, 12 May 2006 23:24:09 +0000 Subject: [lib] CID #55, fix return of freed pointer, cmd_describe_command_real 2006-05-12 Paul Jakma * command.c: (cmd_describe_command_real) Fix return of freed pointer when no-match, CID #55. --- lib/command.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/command.c') diff --git a/lib/command.c b/lib/command.c index 1c277b38..07297eff 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1,5 +1,5 @@ /* - $Id: command.c,v 1.52 2006/05/12 23:19:37 paul Exp $ + $Id: command.c,v 1.53 2006/05/12 23:24:09 paul Exp $ Command interpreter routine for virtual terminal [aka TeletYpe] Copyright (C) 1997, 98, 99 Kunihiro Ishiguro @@ -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; } -- cgit v1.2.1