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/+/9376

-- gerrit

commit 0c2161ac2fd10d06f1375927d08009bb26524b29
Author: Antonio Borneo <[email protected]>
Date:   Sun Jan 4 17:34:39 2026 +0100

    server: close the TCP socket while stopping a service
    
    The function free_service() does not close the TCL socket when the
    service is shutdown.
    
    Add the necessarily code.
    
    Change-Id: I58c5c4fee3111949fcc143c6226522c29d976493
    Signed-off-by: Antonio Borneo <[email protected]>

diff --git a/src/server/server.c b/src/server/server.c
index 7cb396780a..0b957836d3 100644
--- a/src/server/server.c
+++ b/src/server/server.c
@@ -193,6 +193,8 @@ static void free_service(struct service *c)
 {
        if (c->type == CONNECTION_PIPE && c->fd != -1)
                close(c->fd);
+       if (c->type == CONNECTION_TCP && c->fd != -1)
+               close_socket(c->fd);
        if (c->service_dtor)
                c->service_dtor(c);
        free(c->name);

-- 

Reply via email to