This is an automated email from Gerrit.

"Antonio Borneo <[email protected]>" just uploaded a new patch set to 
Gerrit, which you can find at https://review.openocd.org/c/openocd/+/9266

-- gerrit

commit 8cbe10664925176d2ea836b2855b18b64fc7ca29
Author: Antonio Borneo <[email protected]>
Date:   Sat Nov 22 22:03:10 2025 +0100

    server: fix a new double free()
    
    By reorganizing the free() of the service and its subfields, the
    patch reported in 'fixes' exposes a new double free().
    Issue detected by 'scan-build'.
    
    Fix it.
    
    Fixes: 5ff384be086a ("semihosting: fix memory leak and double free")
    Change-Id: Ief4262e98c9ecdca39d4e2d77e7a0ea87cfa198c
    Signed-off-by: Antonio Borneo <[email protected]>

diff --git a/src/server/server.c b/src/server/server.c
index 494fd9da30..81d79d41b1 100644
--- a/src/server/server.c
+++ b/src/server/server.c
@@ -378,7 +378,6 @@ int remove_service(const char *name, const char *port)
                        if (tmp->type != CONNECTION_STDINOUT)
                                close_socket(tmp->fd);
 
-                       free(tmp->priv);
                        free_service(tmp);
 
                        return ERROR_OK;

-- 

Reply via email to