Prevent a NULL dereference in error code path.
authormpi <mpi@openbsd.org>
Tue, 16 Apr 2024 08:53:02 +0000 (08:53 +0000)
committermpi <mpi@openbsd.org>
Tue, 16 Apr 2024 08:53:02 +0000 (08:53 +0000)
commite24863265e34f4cfb83c826c02d5349776140d42
tree9d805fc50aa5f3f87b9487a603ece5960c1c7235
parent25b30cac31a34aa42e61e117dc90757a8a029088
Prevent a NULL dereference in error code path.

Under memory pressure allocating an amap chunk can fail.  In such case it
is not possible to call amap_wipeout() because the newly allocated amap
isn't yet on the global list.

Issue reported by bluhm@, ok jsg@
sys/uvm/uvm_amap.c