From 2b12d62e38bf41648b2703b5a5c48e47eb01edc7 Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Thu, 8 Aug 2024 01:17:11 +0300 Subject: [PATCH] lib: fix crash on distribute-list delete The destroy callback must be executed only once on APPLY stage. Fixes #16528 Signed-off-by: Igor Ryzhov --- lib/distribute.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/distribute.c b/lib/distribute.c index ccd1f1379efd..90a73c363585 100644 --- a/lib/distribute.c +++ b/lib/distribute.c @@ -458,6 +458,8 @@ int group_distribute_list_create_helper( int group_distribute_list_destroy(struct nb_cb_destroy_args *args) { + if (args->event != NB_EV_APPLY) + return NB_OK; nb_running_unset_entry(args->dnode); return NB_OK; }