From 7d79ee29ebed2cf535f1eb8f84670bd4137cf0ae Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Mon, 6 Feb 2023 16:52:08 +0100 Subject: [PATCH] added some useless NULL check --- src/core/lib/utils/memory.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/lib/utils/memory.c b/src/core/lib/utils/memory.c index 730d9a6..429239d 100644 --- a/src/core/lib/utils/memory.c +++ b/src/core/lib/utils/memory.c @@ -90,6 +90,8 @@ void remove_node(node_t *node) node_t *get_node(void *pointer) { + if (head == NULL) return NULL; //EMPTY LIST + node_t *buffer = head; while (buffer -> next != NULL) {