From: Alexey Simakov <bigalex934@gmail.com>
To: Sunil Kumar Kori <skori@marvell.com>
Cc: Alexey Simakov <bigalex934@gmail.com>,
Rakesh Kudurumalla <rkudurumalla@marvell.com>,
Nithin Dabilpuram <ndabilpuram@marvell.com>,
Jerin Jacob <jerinj@marvell.com>,
dev@dpdk.org, sdl.dpdk@linuxtesting.org
Subject: [PATCH] graph/conn: fix memory leak on socket init failure
Date: Tue, 2 Jun 2026 16:12:58 +0300 [thread overview]
Message-ID: <20260602131257.108880-1-bigalex934@gmail.com> (raw)
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
reply other threads:[~2026-06-02 13:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260602131257.108880-1-bigalex934@gmail.com \
--to=bigalex934@gmail.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=ndabilpuram@marvell.com \
--cc=rkudurumalla@marvell.com \
--cc=sdl.dpdk@linuxtesting.org \
--cc=skori@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox