diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c --- a/sys/vm/uma_core.c +++ b/sys/vm/uma_core.c @@ -3171,6 +3171,11 @@ #ifdef SMP MPASS(zone->uz_flags & UMA_ZONE_PCPU); #endif + + /* uma_zfree_pcu_*(..., NULL) does nothing, to match free(9). */ + if (pcpu_item == NULL) + return; + item = zpcpu_offset_to_base(pcpu_item); uma_zfree_arg(zone, item, udata); }