X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Futils_llist.c;h=11f838d248f6ab799c53654569f683af07db6d2d;hb=dbf349ec8c0150a52a7bad5f8b9fc79a6201e2f6;hp=6a0c6f06411b76e7fa15083bb1d5fd850c9d48f0;hpb=fabc18dac7e676b4e6577bcb6880d501dccc5b31;p=collectd.git diff --git a/src/utils_llist.c b/src/utils_llist.c index 6a0c6f06..11f838d2 100644 --- a/src/utils_llist.c +++ b/src/utils_llist.c @@ -120,6 +120,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;