From 3a980d83e0b78eddfcec4d7a31e0f9e993b9fac2 Mon Sep 17 00:00:00 2001 From: Oliver Hartkopp Date: Wed, 14 Oct 2026 10:04:44 +0000 Subject: [PATCH] isobusfs: srv: free handle path when closing the handle The path of an opened file or directory handle is allocated with strdup() but was not freed when the handle got closed. Every open/close sequence leaked the path string. Free the path before clearing the handle. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Oliver Hartkopp --- isobusfs/isobusfs_srv_fa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/isobusfs/isobusfs_srv_fa.c b/isobusfs/isobusfs_srv_fa.c index d48aa59..4551270 100644 --- a/isobusfs/isobusfs_srv_fa.c +++ b/isobusfs/isobusfs_srv_fa.c @@ -159,6 +159,7 @@ static int isobusfs_srv_release_handle(struct isobusfs_srv_priv *priv, closedir(hdl->dir); else close(hdl->fd); + free(hdl->path); memset(hdl, 0, sizeof(*hdl)); priv->handles_count--; }