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 EC7EB42B43 for ; Fri, 19 May 2023 06:30:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EA3E042D3F; Fri, 19 May 2023 06:30:32 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id 93BF342D32; Fri, 19 May 2023 06:30:30 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EE0D21FB; Thu, 18 May 2023 21:31:14 -0700 (PDT) Received: from net-arm-n1amp-02.shanghai.arm.com (net-arm-n1amp-02.shanghai.arm.com [10.169.210.108]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id BCA223F762; Thu, 18 May 2023 21:30:27 -0700 (PDT) From: Ruifeng Wang To: Anatoly Burakov Cc: dev@dpdk.org, honnappa.nagarahalli@arm.com, feifei.wang2@arm.com, nd@arm.com, Ruifeng Wang , stable@dpdk.org Subject: [PATCH 3/4] test/malloc: fix missing free Date: Fri, 19 May 2023 12:29:22 +0800 Message-Id: <20230519042923.314670-4-ruifeng.wang@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230519042923.314670-1-ruifeng.wang@arm.com> References: <20230519042923.314670-1-ruifeng.wang@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Free the allocated buffer before returning. Fixes: a40a1f8231b4 ("app: various tests update") Cc: stable@dpdk.org Signed-off-by: Ruifeng Wang Reviewed-by: Feifei Wang --- app/test/test_malloc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/app/test/test_malloc.c b/app/test/test_malloc.c index de40e50611..f144b89d88 100644 --- a/app/test/test_malloc.c +++ b/app/test/test_malloc.c @@ -937,6 +937,7 @@ test_alloc_single_socket(int32_t socket) if (mem == NULL) return -1; if (addr_to_socket(mem) != desired_socket) { + rte_free(mem); return -1; } rte_free(mem); -- 2.25.1