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 C6835A0A0C for ; Fri, 9 Jul 2021 08:02:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 976F540143; Fri, 9 Jul 2021 08:02:42 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id A1E3140143; Fri, 9 Jul 2021 08:02:40 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10039"; a="189331110" X-IronPort-AV: E=Sophos;i="5.84,226,1620716400"; d="scan'208";a="189331110" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2021 23:02:39 -0700 X-IronPort-AV: E=Sophos;i="5.84,226,1620716400"; d="scan'208";a="487932862" Received: from unknown (HELO localhost.localdomain) ([10.240.183.93]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2021 23:02:36 -0700 From: dapengx.yu@intel.com To: Jasvinder Singh , Cristian Dumitrescu Cc: dev@dpdk.org, Dapeng Yu , stable@dpdk.org Date: Fri, 9 Jul 2021 14:00:56 +0800 Message-Id: <20210709060056.957949-1-dapengx.yu@intel.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH] net/softnic: fix memory leak in connection init 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: Dapeng Yu In function softnic_conn_init(), a block of memory is allocated as connection buffer, but it is never freed in softnic_conn_free(), which cause memory leak. This patch fixes it. Fixes: 7709a63bf178 ("net/softnic: add connection agent") Cc: stable@dpdk.org Signed-off-by: Dapeng Yu --- drivers/net/softnic/conn.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/softnic/conn.c b/drivers/net/softnic/conn.c index 8b66580887..a9548beac7 100644 --- a/drivers/net/softnic/conn.c +++ b/drivers/net/softnic/conn.c @@ -146,6 +146,7 @@ softnic_conn_free(struct softnic_conn *conn) free(conn->msg_in); free(conn->prompt); free(conn->welcome); + free(conn->buf); free(conn); } -- 2.27.0