commit 02f4a275a04968a889c6bae1a18caaf35cca9168
parent 3c63339b5222b46da0d0f44ed45a0554ad0b2f87
Author: Jacki <jacki@thejackimonster.de>
Date: Sun, 5 May 2024 22:40:48 +0200
Fix leaking nick of context
Signed-off-by: Jacki <jacki@thejackimonster.de>
Diffstat:
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/gnunet_chat_context.c b/src/gnunet_chat_context.c
@@ -161,6 +161,9 @@ context_destroy (struct GNUNET_CHAT_Context *context)
if (context->topic)
GNUNET_free(context->topic);
+ if (context->nick)
+ GNUNET_free(context->nick);
+
GNUNET_free(context);
}
diff --git a/src/gnunet_chat_lib_intern.c b/src/gnunet_chat_lib_intern.c
@@ -295,6 +295,7 @@ task_group_destruction (void *cls)
), sizeof(key));
GNUNET_MESSENGER_close_room(group->context->room);
+ group->context->room = NULL;
GNUNET_CONTAINER_multihashmap_remove(
group->handle->groups, &key, group