From 1eac7f937902a38a747bf4707ef751b47dfe7086 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Mon, 13 Dec 2021 09:38:46 +0000 Subject: [PATCH] No need to free context id here. This used to be a protection against removing from the by_id hash twice, but there is a separate protection for that now. --- src/context.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/context.c b/src/context.c index 91a9dbf4..dcf4322d 100644 --- a/src/context.c +++ b/src/context.c @@ -259,11 +259,7 @@ void context__add_to_disused(struct mosquitto *context) mosquitto__set_state(context, mosq_cs_disused); - if(context->id){ - context__remove_from_by_id(context); - mosquitto__free(context->id); - context->id = NULL; - } + context__remove_from_by_id(context); context->for_free_next = db.ll_for_free; db.ll_for_free = context;