From: Paul Jakma Date: Mon, 15 May 2006 10:56:46 +0000 (+0000) Subject: [lib] CID #39, Fix the vty completion leak-fix to only free when desired X-Git-Tag: frr-2.0-rc1~2693 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=d16e04335968ea05fda60cec01b48df8c345a8ce;p=mirror%2Ffrr.git [lib] CID #39, Fix the vty completion leak-fix to only free when desired 2006-05-13 Paul Jakma * 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/ChangeLog b/lib/ChangeLog index f5cee80b7b..7d3eb6771c 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,9 @@ +2006-05-13 Paul Jakma + + * 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 * plist.c: (vty_prefix_list_uninstall) Fix potential NULL deref diff --git a/lib/vty.c b/lib/vty.c index 98f6494e25..7696915a75 100644 --- 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);