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 <vincent@systemli.org>
This commit is contained in:
Nick Hainke 2022-07-21 16:46:06 +02:00
parent e596ff1317
commit d74001d8ee

View file

@ -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;