* [PATCH] graph/conn: fix memory leak on socket init failure
@ 2026-06-02 13:12 Alexey Simakov
0 siblings, 0 replies; only message in thread
From: Alexey Simakov @ 2026-06-02 13:12 UTC (permalink / raw)
To: Sunil Kumar Kori
Cc: Alexey Simakov, Rakesh Kudurumalla, Nithin Dabilpuram,
Jerin Jacob, dev, sdl.dpdk
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@marvell.com
Signed-off-by: Alexey Simakov <bigalex934@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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-02 13:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-02 13:12 [PATCH] graph/conn: fix memory leak on socket init failure Alexey Simakov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox