]> git.puffer.fish Git - mirror/frr.git/commitdiff
[lib] CID #39, Fix the vty completion leak-fix to only free when desired
authorPaul Jakma <paul.jakma@sun.com>
Mon, 15 May 2006 10:56:46 +0000 (10:56 +0000)
committerPaul Jakma <paul.jakma@sun.com>
Mon, 15 May 2006 10:56:46 +0000 (10:56 +0000)
2006-05-13 Paul Jakma <paul.jakma@sun.com>

* vty.c: (vty_describe_command) CID #39 fix was too hasty, just
  cause it /can/ leak doesn't mean it always will have, check
  first.

lib/ChangeLog
lib/vty.c

index f5cee80b7b40d5daf4db7fb40c72dbdad0d730cf..7d3eb6771c3efce09940a79b2cefa30cd7283c16 100644 (file)
@@ -1,3 +1,9 @@
+2006-05-13 Paul Jakma <paul.jakma@sun.com>
+
+       * vty.c: (vty_describe_command) CID #39 fix was too hasty, just
+         cause it /can/ leak doesn't mean it always will have, check
+         first.
+
 2006-05-12 Paul Jakma <paul.jakma@sun.com>
 
        * plist.c: (vty_prefix_list_uninstall) Fix potential NULL deref
index 98f6494e257fe4295880662b99fedffb42973341..7696915a75620733184fae1c30eb62ab30796116 100644 (file)
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -1062,7 +1062,8 @@ vty_describe_command (struct vty *vty)
 
 out:
   cmd_free_strvec (vline);
-  vector_free (describe);
+  if (describe)
+    vector_free (describe);
 
   vty_prompt (vty);
   vty_redraw_line (vty);