From 0c285690eb07842f2456dc3106a8a0c899e46b5a Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Fri, 24 Mar 2023 19:23:16 +0100 Subject: [PATCH] revert last commit (why2-memory in chat-misc) for some reason it was causing segfault --- src/chat/misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chat/misc.c b/src/chat/misc.c index 060ee5b..1a22038 100644 --- a/src/chat/misc.c +++ b/src/chat/misc.c @@ -43,7 +43,7 @@ node_t *head = NULL; void push_to_list(int connection, pthread_t thread) { //CREATE NODE - node_t *new_node = why2_malloc(sizeof(node_t)); + node_t *new_node = malloc(sizeof(node_t)); node_t *buffer = head; new_node -> connection = connection; @@ -93,7 +93,7 @@ void remove_node(node_t *node) } //DEALLOCATION - why2_deallocate(node); + free(node); } node_t *get_node(int connection)