author | Florian Forster <octo@collectd.org> | |
Wed, 17 Jun 2015 07:09:17 +0000 (09:09 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Wed, 17 Jun 2015 07:09:20 +0000 (09:09 +0200) | ||
commit | 707fa6cb057b53846aaa27a505fe05226612ecd3 | |
tree | 84e2ca21a8a210e8b4e9e79eda8bbbf394d7b34e | tree | snapshot |
parent | 86ef26818f3a1af5afb4842e9c97c34ffe98bafa | commit | diff |
src/utils_llist.c: Handle unlikely corner case.
This handles the following (unlikely) case:
(l->head == NULL) && (e == NULL)
In this case, the following code will dereference a NULL pointer:
if (l->head == e)
l->head = e->next;
This handles the following (unlikely) case:
(l->head == NULL) && (e == NULL)
In this case, the following code will dereference a NULL pointer:
if (l->head == e)
l->head = e->next;
src/utils_llist.c | diff | blob | history |