From: Donald Sharp Date: Mon, 2 Oct 2017 14:47:25 +0000 (-0400) Subject: zebra: Cleanup ptm memory *after* we tell the sockets to clean up X-Git-Tag: frr-4.0-dev~256^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F1277%2Fhead;p=mirror%2Ffrr.git zebra: Cleanup ptm memory *after* we tell the sockets to clean up 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 --- diff --git a/zebra/main.c b/zebra/main.c index 4864b4961d..bf1971c470 100644 --- a/zebra/main.c +++ b/zebra/main.c @@ -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) {