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: [email protected]

Signed-off-by: Alexey Simakov <[email protected]>
---
 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

Reply via email to