From: paul Date: Wed, 4 Jun 2003 02:23:15 +0000 (+0000) Subject: From: kamatchi soundaram X-Git-Tag: frr-2.0-rc1~4011 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=ec1ca63c188c9dc2518b0f78033e623105ac4f25;p=matthieu%2Ffrr.git From: kamatchi soundaram Subject: [zebra 19262] Re: Memory leak in OSPF Fix applied for Kamatchi's original report was to remove the auth_crypt initialisation from the wrong function. This should fix that. --- diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index 9f566a452d..83abf5538f 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -489,6 +489,8 @@ ospf_new_if_params () UNSET_IF_PARAM (oip, auth_simple); UNSET_IF_PARAM (oip, auth_crypt); UNSET_IF_PARAM (oip, auth_type); + + oip->auth_crypt = list_new (); return oip; } @@ -623,9 +625,6 @@ ospf_if_new_hook (struct interface *ifp) SET_IF_PARAM (IF_DEF_PARAMS (ifp), auth_simple); memset (IF_DEF_PARAMS (ifp)->auth_simple, 0, OSPF_AUTH_SIMPLE_SIZE); - SET_IF_PARAM (IF_DEF_PARAMS (ifp), auth_crypt); - IF_DEF_PARAMS (ifp)->auth_crypt = list_new (); - SET_IF_PARAM (IF_DEF_PARAMS (ifp), auth_type); IF_DEF_PARAMS (ifp)->auth_type = OSPF_AUTH_NOTSET;