Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 May 2021 20:11:40 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: dec9f377531d - stable/13 - gpioc_detach: fix freeing of wrong pointers
Message-ID:  <202105032011.143KBeYW032232@gitrepo.freebsd.org>

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

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

commit dec9f377531db4ddb6de200d14ee306b61b66bac
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:11:12 +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 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);
 



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