aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2023-08-10 17:32:33 +0000
committerKyle Evans <kevans@FreeBSD.org>2023-08-10 17:33:26 +0000
commit2bd446d7f1a03fbf6d98ace4548f8793599f48fb (patch)
tree5e3d1b949ef8f0b932e9bdc9670becba216f6e64 /sys
parent60a41168d195cc09f7351c2c2bcafc389ed52406 (diff)
downloadsrc-2bd446d7f1a03fbf6d98ace4548f8793599f48fb.tar.gz
src-2bd446d7f1a03fbf6d98ace4548f8793599f48fb.zip
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_osd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/kern_osd.c b/sys/kern/kern_osd.c
index 23178731b899..ced6df31cf44 100644
--- a/sys/kern/kern_osd.c
+++ b/sys/kern/kern_osd.c
@@ -396,6 +396,9 @@ osd_call(u_int type, u_int method, void *obj, void *data)
error = 0;
sx_slock(&osdm[type].osd_module_lock);
for (i = 0; i < osdm[type].osd_ntslots; i++) {
+ /* Hole in the slot map; avoid dereferencing. */
+ if (osdm[type].osd_destructors[i] == NULL)
+ continue;
methodfun = osdm[type].osd_methods[i * osdm[type].osd_nmethods +
method];
if (methodfun != NULL && (error = methodfun(obj, data)) != 0)