All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: Olivier Matz <olivier.matz@6wind.com>,
	Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,
	Zhihong Peng <zhihongx.peng@intel.com>
Subject: [dpdk-dev] [PATCH] test/cmdline: fix memory leak
Date: Fri, 29 Oct 2021 13:23:15 +0200	[thread overview]
Message-ID: <20211029112315.25748-1-david.marchand@redhat.com> (raw)

Previous change wrongly removed a valid cmdline_free().

Fixes: 6ad06203a587 ("cmdline: free on exit")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test/test_cmdline_lib.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/app/test/test_cmdline_lib.c b/app/test/test_cmdline_lib.c
index f238094b07..f50ccdb599 100644
--- a/app/test/test_cmdline_lib.c
+++ b/app/test/test_cmdline_lib.c
@@ -176,6 +176,8 @@ test_cmdline_socket_fns(void)
 		printf("Error: failed to open /dev/null for reading!");
 		return -1;
 	}
+	cmdline_free(cl);
+	cl = NULL;
 
 	/* void functions */
 	cmdline_stdin_exit(NULL);
-- 
2.23.0


             reply	other threads:[~2021-10-29 11:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 11:23 David Marchand [this message]
2021-10-29 12:13 ` [dpdk-dev] [PATCH] test/cmdline: fix memory leak Olivier Matz
2021-11-04 10:08   ` David Marchand

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=20211029112315.25748-1-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=olivier.matz@6wind.com \
    --cc=zhihongx.peng@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.