[PATCH] graph/conn: fix memory leak on socket init failure
Alexey Simakov
bigalex934 at gmail.com
Tue Jun 2 15:12:58 CEST 2026
In conn_init(), conn_free() does not release the buffer allocated
for conn structure, resulting in a memory leak when server socket
creation fails.
Add missing free(c->buf) call to conn_free().
Fixes: 3f90eda5b7fb ("app/graph: add telnet connectivity")
Cc: skori at marvell.com
Signed-off-by: Alexey Simakov <bigalex934 at gmail.com>
---
app/graph/conn.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/graph/conn.c b/app/graph/conn.c
index c5e1c1ae1b..e73e929a08 100644
--- a/app/graph/conn.c
+++ b/app/graph/conn.c
@@ -197,6 +197,7 @@ conn_free(struct conn *c)
free(c->msg_in);
free(c->prompt);
free(c->welcome);
+ free(c->buf);
free(c);
}
--
2.34.1
More information about the dev
mailing list