projects
/
oweals
/
libubox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c434230
)
safe_list: add missing null pointer check in safe_list_del()
author
Felix Fietkau
<nbd@openwrt.org>
Fri, 28 Jun 2013 11:05:06 +0000
(13:05 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Fri, 28 Jun 2013 11:05:06 +0000
(13:05 +0200)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
safe_list.c
patch
|
blob
|
history
diff --git
a/safe_list.c
b/safe_list.c
index d9f211f905460b7fb29fa6c27fa8649f94441f67..f26b4dd11d7f2b591210092c7dfd1fec33cccf8a 100644
(file)
--- 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;
}