diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-06-28 15:05:06 +0400 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-06-28 15:05:06 +0400 |
commit | 316e3fb6c28ab3a2244d059fc3b9429df8cc9f0a (patch) | |
tree | 9ca39019e379ae3e52193a8e717fd4b34e83f73b /safe_list.c | |
parent | c434230a76e2fdd97b77ca96f64569c91e7df8a1 (diff) |
safe_list: add missing null pointer check in safe_list_del()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'safe_list.c')
-rw-r--r-- | safe_list.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/safe_list.c b/safe_list.c index d9f211f..f26b4dd 100644 --- a/safe_list.c +++ b/safe_list.c @@ -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; } |