safe_list: add missing null pointer check in safe_list_del()

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
This commit is contained in:
Felix Fietkau 2013-06-28 13:05:06 +02:00
parent c434230a76
commit 316e3fb6c2

View file

@ -108,7 +108,8 @@ void safe_list_del(struct safe_list *list)
next->i = list->i;
list->i->head = &next->i;
*tail = next_i;
next_i->head = tail;
if (next_i)
next_i->head = tail;
list->i = NULL;
}