This is an automated email from Gerrit.

"Tomas Vanek <van...@fbl.cz>" just uploaded a new patch set to Gerrit, which 
you can find at https://review.openocd.org/c/openocd/+/8732

-- gerrit

commit 975222c134143e5a9c51d907d6fd5b6c1d5c5103
Author: Tomas Vanek <van...@fbl.cz>
Date:   Mon Feb 3 20:23:08 2025 +0100

    drivers/linuxspidev: fix minor memory leak
    
    free() strduped spi_path on quit.
    Found by valgrind.
    
    Change-Id: Iaa59c7258c920b5e60d615df790dfe815831b925
    Signed-off-by: Tomas Vanek <van...@fbl.cz>
    Fixes: 83e0293f7ba3 ("Add Linux SPI device SWD adapter support")

diff --git a/src/jtag/drivers/linuxspidev.c b/src/jtag/drivers/linuxspidev.c
index 737d2bef83..94a0c510af 100644
--- a/src/jtag/drivers/linuxspidev.c
+++ b/src/jtag/drivers/linuxspidev.c
@@ -337,6 +337,10 @@ static int spidev_quit(void)
 
        close(spi_fd);
        spi_fd = -1;
+
+       free(spi_path);
+       spi_path = NULL;
+
        return ERROR_OK;
 }
 

-- 

Reply via email to