From 3c6b59567f61277ed487320aa9ad130c6894ad7a Mon Sep 17 00:00:00 2001 From: Andriy Gapon Date: Tue, 23 Mar 2021 12:45:18 +0200 Subject: [PATCH] gpioc_detach: fix freeing of wrong pointers MFC after: 1 week --- sys/dev/gpio/gpioc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/gpio/gpioc.c b/sys/dev/gpio/gpioc.c index 9e46b32ffcba..15d0848fc020 100644 --- a/sys/dev/gpio/gpioc.c +++ b/sys/dev/gpio/gpioc.c @@ -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);