aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJamie Gritton <jamie@FreeBSD.org>2009-04-30 22:43:21 +0000
committerJamie Gritton <jamie@FreeBSD.org>2009-04-30 22:43:21 +0000
commit3dd4fac97c377820c583cdce806e0761f2e30486 (patch)
tree853aa4f3d03a6b300f8b296a0273de282f22160f /sys
parent6fca021096ad2782158dd64b170295ccbd46475e (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_osd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/kern_osd.c b/sys/kern/kern_osd.c
index 0aed19dcdc6d..1cb83e4cc305 100644
--- a/sys/kern/kern_osd.c
+++ b/sys/kern/kern_osd.c
@@ -297,8 +297,10 @@ do_osd_del(u_int type, struct osd *osd, u_int slot, int list_locked)
OSD_DEBUG("Slot doesn't exist (type=%u, slot=%u).", type, slot);
return;
}
- osd_destructors[type][slot - 1](osd->osd_slots[slot - 1]);
- osd->osd_slots[slot - 1] = NULL;
+ if (osd->osd_slots[slot - 1] != NULL) {
+ osd_destructors[type][slot - 1](osd->osd_slots[slot - 1]);
+ osd->osd_slots[slot - 1] = NULL;
+ }
for (i = osd->osd_nslots - 1; i >= 0; i--) {
if (osd->osd_slots[i] != NULL) {
OSD_DEBUG("Slot still has a value (type=%u, slot=%u).",