gpioc_detach: fix freeing of wrong pointers

MFC after:	1 week
This commit is contained in:
Andriy Gapon 2021-03-23 12:45:18 +02:00
parent 4489124c04
commit 3c6b59567f

View File

@ -618,7 +618,7 @@ gpioc_detach(device_t dev)
for (int i = 0; i < sc->sc_npins; i++) {
mtx_destroy(&sc->sc_pin_intr[i].mtx);
free(&sc->sc_pin_intr[i].pin, M_GPIOC);
free(sc->sc_pin_intr[i].pin, M_GPIOC);
}
free(sc->sc_pin_intr, M_GPIOC);