diff --git a/sys/geom/gate/g_gate.c b/sys/geom/gate/g_gate.c index 3453eef9b783..8cfe9d4aaac0 100644 --- a/sys/geom/gate/g_gate.c +++ b/sys/geom/gate/g_gate.c @@ -945,7 +945,7 @@ g_gate_modevent(module_t mod, int type, void *data) } mtx_unlock(&g_gate_units_lock); mtx_destroy(&g_gate_units_lock); - if (status_dev != 0) + if (status_dev != NULL) destroy_dev(status_dev); free(g_gate_units, M_GATE); break;