From eb098b0d0fb8b3fc8a0fa96c8ea0061561ef2327 Mon Sep 17 00:00:00 2001 From: GalaxyGorilla Date: Mon, 29 Jun 2020 15:45:37 +0000 Subject: [PATCH] pathd: fix heap use after deletion Signed-off-by: GalaxyGorilla --- pathd/path_nb_config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pathd/path_nb_config.c b/pathd/path_nb_config.c index aea38552251a..7608092cbb24 100644 --- a/pathd/path_nb_config.c +++ b/pathd/path_nb_config.c @@ -132,9 +132,10 @@ int pathd_te_segment_list_segment_destroy(struct nb_cb_destroy_args *args) return NB_OK; segment = nb_running_unset_entry(args->dnode); - srte_segment_entry_del(segment); SET_FLAG(segment->segment_list->flags, F_SEGMENT_LIST_MODIFIED); + srte_segment_entry_del(segment); + return NB_OK; }