From: Alan T. DeKok Date: Mon, 15 Apr 2024 17:57:45 +0000 (-0400) Subject: we can release a partially written packet X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdaf21c453e24b39415bf69646cf5e35174c401f;p=thirdparty%2Ffreeradius-server.git we can release a partially written packet --- diff --git a/src/lib/bio/dedup.c b/src/lib/bio/dedup.c index 3f25d3a6a15..570ef63b5c1 100644 --- a/src/lib/bio/dedup.c +++ b/src/lib/bio/dedup.c @@ -81,9 +81,9 @@ struct fr_bio_dedup_s { /* * The "first" entry is cached here so that we can detect when it changes. The insert / delete * code can just do its work without worrying about timers. And then when the tree manipulation - * is done, call the fr_bio_retry_reset_timer() function to reset (or not) the timer. + * is done, call the fr_bio_dedup_reset_timer() function to reset (or not) the timer. * - * The time is when the first packet expires. + * The timer is set for is when the first packet expires. */ fr_bio_dedup_entry_t *first; @@ -223,7 +223,10 @@ static void fr_bio_dedup_release(fr_bio_dedup_t *my, fr_bio_dedup_entry_t *item, { my->release((fr_bio_t *) my, item, reason); - (void) fr_rb_remove_by_inline_node(&my->rb, &item->node); + /* + * Partially written items aren't in the expiry tree. + */ + if (my->partial != item) (void) fr_rb_remove_by_inline_node(&my->rb, &item->node); /* * We're deleting the timer entry. Go reset the timer.