]> git.puffer.fish Git - mirror/frr.git/commitdiff
[lib] CID #37, fix error case leak, cmd_complete_command_real
authorPaul Jakma <paul.jakma@sun.com>
Fri, 12 May 2006 23:19:37 +0000 (23:19 +0000)
committerPaul Jakma <paul.jakma@sun.com>
Fri, 12 May 2006 23:19:37 +0000 (23:19 +0000)
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.

lib/ChangeLog
lib/command.c

index 64fa8518adba760ee9aad2b1bf90684405db2488..dc9999b380e849dbf02d62369edd7497c4a7fc4a 100644 (file)
@@ -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>
 
index ac3516c344308040f616b81627b7b2371b948052..1c277b384dc20a55a10fafdf451c36f7146bbb65 100644 (file)
@@ -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;
     }