[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.
This commit is contained in:
Paul Jakma 2006-05-15 10:56:46 +00:00
parent 0b26f81bf9
commit d16e043359
2 changed files with 8 additions and 1 deletions

View 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

View File

@ -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);