Especially its "next" member: this is what caused the crash in "slabtop:
Reset slab_list if get_slabinfo() fails." (if parse_slabinfo*() fails in
sscanf(), for example, then curr is set to NULL but it is already linked
into the "list" and its "next" member was never initialized).
*/
static struct slab_info *get_slabnode(void)
{
+ static const struct slab_info initializer;
struct slab_info *node;
if (free_index) {
} else {
node = xmalloc(sizeof(struct slab_info));
}
-
+ *node = initializer;
return node;
}