]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Fix cleanup crash
authorDonald Sharp <sharpd@cumulusnetworks.com>
Sun, 11 Dec 2016 20:24:13 +0000 (15:24 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 22 Dec 2016 01:26:19 +0000 (20:26 -0500)
When shutting down, actually delete the right data
structures.

Stupid cut-n-paste error on my part.

Ticket: CM-14018
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_oil.c
pimd/pim_upstream.c

index 44c832434270a8f0838d3234bdb08286cd3ed518..aa059797da10f0f7442ae8e6d4e03b1ef77ce40b 100644 (file)
@@ -100,7 +100,8 @@ pim_oil_terminate (void)
   pim_channel_oil_list = NULL;
 
   if (pim_channel_oil_hash)
-    hash_free (pim_upstream_hash);
+    hash_free (pim_channel_oil_hash);
+  pim_channel_oil_hash = NULL;
 }
 
 void pim_channel_oil_free(struct channel_oil *c_oil)
index b0bac7b7d4c04546dbea37117b9b4897ce79b544..d111289e5afc9a0d1fdb888dd083d2bb421c0f3b 100644 (file)
@@ -1377,11 +1377,12 @@ pim_upstream_hash_key (void *arg)
 void pim_upstream_terminate (void)
 {
   if (pim_upstream_list)
-    list_free (pim_upstream_list);
+    list_delete (pim_upstream_list);
   pim_upstream_list = NULL;
 
   if (pim_upstream_hash)
     hash_free (pim_upstream_hash);
+  pim_upstream_hash = NULL;
 }
 
 static int