From: Maria Matejka Date: Mon, 19 Aug 2019 12:43:14 +0000 (+0200) Subject: Slab: Init node in slab head to NULLs. X-Git-Tag: v2.0.8~77^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fheads%2Fmq-static-analysis;p=thirdparty%2Fbird.git Slab: Init node in slab head to NULLs. --- diff --git a/lib/slab.c b/lib/slab.c index 5c414f9e1..c3035b45b 100644 --- a/lib/slab.c +++ b/lib/slab.c @@ -216,8 +216,11 @@ sl_new_head(slab *s) struct sl_obj *no; uint n = s->objs_per_slab; - h->first_free = o; - h->num_full = 0; + *h = (struct sl_head) { + .first_free = o, + .num_full = 0, + }; + while (n--) { o->slab = h;