]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: fix crash on distribute-list delete
authorIgor Ryzhov <idryzhov@gmail.com>
Wed, 7 Aug 2024 22:17:11 +0000 (01:17 +0300)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Thu, 8 Aug 2024 12:23:42 +0000 (12:23 +0000)
The destroy callback must be executed only once on APPLY stage.

Fixes #16528

Signed-off-by: Igor Ryzhov <idryzhov@gmail.com>
(cherry picked from commit 2b12d62e38bf41648b2703b5a5c48e47eb01edc7)

lib/distribute.c

index ccd1f1379efd047d861dfd3320d8e76272dbad87..90a73c363585df815977540ebce28e277c36b84b 100644 (file)
@@ -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;
 }