X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fdaemon%2Futils_llist.c;h=4265286bdaf899dcb2bba34e97a712876d5455b0;hb=6a68a39a2c6987fdcc94fb1bdd9cc8f598fd9478;hp=09c9834d066cf6280ed993515adb36adc2176141;hpb=8aad55ab7d737a97d5927458b2b00885e27cae4d;p=collectd.git 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;