CAM will sometimes remove a disk again even before it finished being
initialized. We already cancel the pending events but we need to not dereference the geom pointer which never got set different from NULL.
This commit is contained in:
parent
7c55d0e338
commit
6d1e88efa3
@ -365,8 +365,10 @@ g_disk_destroy(void *ptr, int flag)
|
||||
g_topology_assert();
|
||||
dp = ptr;
|
||||
gp = dp->d_geom;
|
||||
gp->softc = NULL;
|
||||
g_wither_geom(gp, ENXIO);
|
||||
if (gp != NULL) {
|
||||
gp->softc = NULL;
|
||||
g_wither_geom(gp, ENXIO);
|
||||
}
|
||||
g_free(dp);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user