Don't free(sc) before returning an error from probe, it does not "belong"
to us, subr_bus.c will free it. This bug (panic: freeing already free) was exposed by kern/subr_bus.c rev 1.54 Not explicitly approved by: jkh (but this is a showstopper and fallout of the above approved change)
This commit is contained in:
parent
6d249eee27
commit
a6b8513096
@ -765,7 +765,6 @@ doopen(int unit, int command_byte)
|
||||
--verbose; \
|
||||
kbdc_set_device_mask(sc->kbdc, mask); \
|
||||
kbdc_lock(sc->kbdc, FALSE); \
|
||||
free(sc, M_DEVBUF); \
|
||||
return (v); \
|
||||
}
|
||||
|
||||
|
@ -765,7 +765,6 @@ doopen(int unit, int command_byte)
|
||||
--verbose; \
|
||||
kbdc_set_device_mask(sc->kbdc, mask); \
|
||||
kbdc_lock(sc->kbdc, FALSE); \
|
||||
free(sc, M_DEVBUF); \
|
||||
return (v); \
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user