[lib] CID #39, Fix the vty completion leak-fix to only free when desired
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.
diff --git a/lib/vty.c b/lib/vty.c
index 98f6494..7696915 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -1062,7 +1062,8 @@
out:
cmd_free_strvec (vline);
- vector_free (describe);
+ if (describe)
+ vector_free (describe);
vty_prompt (vty);
vty_redraw_line (vty);