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 92730A0C46; Tue, 31 Aug 2021 04:34:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5F917410F8; Tue, 31 Aug 2021 04:34:25 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 223F5410F6; Tue, 31 Aug 2021 04:34:22 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10092"; a="205520035" X-IronPort-AV: E=Sophos;i="5.84,365,1620716400"; d="scan'208";a="205520035" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2021 19:34:21 -0700 X-IronPort-AV: E=Sophos;i="5.84,365,1620716400"; d="scan'208";a="530838523" Received: from unknown (HELO localhost.localdomain) ([10.240.183.63]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Aug 2021 19:34:19 -0700 From: zhihongx.peng@intel.com To: olivier.matz@6wind.com Cc: dev@dpdk.org, Zhihong Peng , stable@dpdk.org Date: Tue, 31 Aug 2021 10:28:44 +0800 Message-Id: <20210831022844.18057-1-zhihongx.peng@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] lib/cmdline: release cl when cmdline exit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- lib/cmdline/cmdline_socket.c | 1 + 1 file changed, 1 insertion(+) 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