X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fdaemon%2Futils_llist.c;fp=src%2Fdaemon%2Futils_llist.c;h=4265286bdaf899dcb2bba34e97a712876d5455b0;hp=09c9834d066cf6280ed993515adb36adc2176141;hb=cf33da9ad00ac94931a2c87563f8d007a996f1ad;hpb=4f70f3c70c73e0f4c6c99a9f2962a09ab31a61b7 diff --git a/src/daemon/utils_llist.c b/src/daemon/utils_llist.c index 09c9834d..4265286b 100644 --- a/src/daemon/utils_llist.c +++ b/src/daemon/utils_llist.c @@ -123,6 +123,9 @@ void llist_remove (llist_t *l, llentry_t *e) { llentry_t *prev; + if ((l == NULL) || (e == NULL)) + return; + prev = l->head; while ((prev != NULL) && (prev->next != e)) prev = prev->next;