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:
Peter Wemm 2000-03-01 19:30:36 +00:00
parent 6d249eee27
commit a6b8513096
2 changed files with 0 additions and 2 deletions

View File

@ -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); \
}

View File

@ -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); \
}