]> git.puffer.fish Git - matthieu/frr.git/commitdiff
From: kamatchi soundaram <kamatchi@tdd.sj.nec.com>
authorpaul <paul>
Wed, 4 Jun 2003 02:28:45 +0000 (02:28 +0000)
committerpaul <paul>
Wed, 4 Jun 2003 02:28:45 +0000 (02:28 +0000)
Subject: [zebra 19263] Another memory leak!! is zebra OSPF

   This memory leak gets into picture whenever any interface goes down.

 Problem found and desctription: Whenever the interface goes down, the
 "def_params" (member of ospf_if_info) structure memory is not freed.

 Fix made: added the following line to free the "def_params" memory of
 ospf_if_info before calling the  "XFREE(MTYPE_OSPF_IF_INFO, ifp->info);"
 The added line is:
       ospf_del_if_params ((struct ospf_if_params *) IF_DEF_PARAMS (ifp));

ospfd/ospf_interface.c

index 83abf5538fd00f5929249f5d5f93a41456cf428e..08bc7fbebcf66fa90b5e02150b9e7e103d63ca90 100644 (file)
@@ -643,6 +643,7 @@ ospf_if_delete_hook (struct interface *ifp)
 #endif /* HAVE_OPAQUE_LSA */
   route_table_finish (IF_OIFS (ifp));
   route_table_finish (IF_OIFS_PARAMS (ifp));
+  ospf_del_if_params ((struct ospf_if_params *) IF_DEF_PARAMS (ifp));
   XFREE (MTYPE_OSPF_IF_INFO, ifp->info);
   ifp->info = NULL;