From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C4FA5A0C4E for ; Wed, 13 Oct 2021 04:03:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AAB8F41100; Wed, 13 Oct 2021 04:03:32 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 543D640150; Wed, 13 Oct 2021 04:03:30 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10135"; a="288194081" X-IronPort-AV: E=Sophos;i="5.85,369,1624345200"; d="scan'208";a="288194081" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2021 19:03:22 -0700 X-IronPort-AV: E=Sophos;i="5.85,369,1624345200"; d="scan'208";a="441460347" Received: from unknown (HELO localhost.localdomain) ([10.240.183.65]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2021 19:03:20 -0700 From: zhihongx.peng@intel.com To: olivier.matz@6wind.com, dmitry.kozliuk@gmail.com Cc: dev@dpdk.org, Zhihong Peng , stable@dpdk.org Date: Wed, 13 Oct 2021 01:52:22 +0000 Message-Id: <20211013015223.1155876-1-zhihongx.peng@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211008064131.369133-1-zhihongx.peng@intel.com> References: <20211008064131.369133-1-zhihongx.peng@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH v4 1/2] lib/cmdline: release cl when cmdline exit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" From: Zhihong Peng Malloc cl in the cmdline_stdin_new function, so release in the cmdline_stdin_exit function is logical, so that cl will not be released alone. Fixes: af75078fece3 ("first public release") Cc: stable@dpdk.org Signed-off-by: Zhihong Peng --- doc/guides/rel_notes/release_21_11.rst | 3 +++ lib/cmdline/cmdline_socket.c | 1 + 2 files changed, 4 insertions(+) diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst index f643a61f44..2f59077709 100644 --- a/doc/guides/rel_notes/release_21_11.rst +++ b/doc/guides/rel_notes/release_21_11.rst @@ -226,6 +226,9 @@ API Changes the crypto/security operation. This field will be used to communicate events such as soft expiry with IPsec in lookaside mode. +* cmdline: ``cmdline_stdin_exit()`` now frees the ``cmdline`` structure. + Calls to ``cmdline_free()`` after it need to be deleted from applications. + ABI Changes ----------- diff --git a/lib/cmdline/cmdline_socket.c b/lib/cmdline/cmdline_socket.c index 998e8ade25..ebd5343754 100644 --- a/lib/cmdline/cmdline_socket.c +++ b/lib/cmdline/cmdline_socket.c @@ -53,4 +53,5 @@ cmdline_stdin_exit(struct cmdline *cl) return; terminal_restore(cl); + cmdline_free(cl); } -- 2.25.1