Fix potential NULL pointer dereference in dt(4).
authorbluhm <bluhm@openbsd.org>
Wed, 13 Mar 2024 13:13:57 +0000 (13:13 +0000)
committerbluhm <bluhm@openbsd.org>
Wed, 13 Mar 2024 13:13:57 +0000 (13:13 +0000)
commit519de792659888f4dfc60a3332fd3dddfb7580fc
tree739bbcefa7249efb98fde49d66b35b9ed5ded097
parent1d617168275327e6f8c3455a16d7b9d737bacdcc
Fix potential NULL pointer dereference in dt(4).

When initializing the profiling probes, check if we sucessfully
allocated the probe, before registering it.  This avoids a NULL
pointer dereference when probe allocation has failed.

from Christian Ludwig
sys/dev/dt/dt_prov_profile.c