Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 May 2021 20:16:25 GMT
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 0a28a6a608d0 - stable/12 - gpioc_detach: fix freeing of wrong pointers
Message-ID:  <202105032016.143KGPUX034360@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by avg:

URL: https://cgit.FreeBSD.org/src/commit/?id=0a28a6a608d081b819f65a92706392e41764ce5d

commit 0a28a6a608d081b819f65a92706392e41764ce5d
Author:     Andriy Gapon <avg@FreeBSD.org>
AuthorDate: 2021-03-23 10:45:18 +0000
Commit:     Andriy Gapon <avg@FreeBSD.org>
CommitDate: 2021-05-03 20:14:49 +0000

    gpioc_detach: fix freeing of wrong pointers
    
    MFC after:      1 week
    
    (cherry picked from commit 3c6b59567f61277ed487320aa9ad130c6894ad7a)
---
 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 727b07a70589..878f761e6dbc 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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105032016.143KGPUX034360>