]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Cleanup ptm memory *after* we tell the sockets to clean up
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 2 Oct 2017 14:47:25 +0000 (10:47 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 2 Oct 2017 15:06:09 +0000 (11:06 -0400)
The zebra_ptm_finish() code was being called before the
client_list deletion.  The client_list deletion is
attempting to call the ptm daemon and shut down the connection.
We should not be doing this *after* we shut down memory associated
with it as that we were writing into memory in random spots
in this case.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
zebra/main.c

index 4864b4961d0892a00b2f8646954f7b51fa380d74..bf1971c4704dba061e532021578b8db7733df8e9 100644 (file)
@@ -127,8 +127,8 @@ static void sigint(void)
 
        frr_early_fini();
 
-       zebra_ptm_finish();
        list_delete_all_node(zebrad.client_list);
+       zebra_ptm_finish();
 
        if (retain_mode)
                RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) {