From bb362db2facd8ce7a39c430a353b6413ec24d70d Mon Sep 17 00:00:00 2001 From: Nick Hainke Date: Thu, 21 Jul 2022 16:46:06 +0200 Subject: [PATCH] datastorage: fix ap_array_unlink_entry always returns NULL For an unknown reason the entry that is returned in ap_array_unlink_entry was always set to NULL. This commit changes the function so it returns the ap that should be unlinked. This is needed to free the corresponding memory that is allocated by the ap struct. Thanks a lot to ptpt52 for reporting this issue. Signed-off-by: Nick Hainke --- src/storage/datastorage.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/storage/datastorage.c b/src/storage/datastorage.c index f75dc5b..7e6da46 100644 --- a/src/storage/datastorage.c +++ b/src/storage/datastorage.c @@ -1004,7 +1004,6 @@ static __inline__ ap* ap_array_unlink_entry(ap** i) { ap* entry = *i; *i = entry->next_ap; - entry = NULL; ap_entry_last--; return entry;