Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2294114iob; Sun, 15 May 2022 14:02:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYtbixjpChRoRHm7a79nMIL5xJhn6DWaxwYbxj/5nf9q1pEkign6tuQ9h8ZlhbR6YbTqOV X-Received: by 2002:adf:ec08:0:b0:20a:d39d:6ab6 with SMTP id x8-20020adfec08000000b0020ad39d6ab6mr11685713wrn.442.1652648547901; Sun, 15 May 2022 14:02:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652648547; cv=none; d=google.com; s=arc-20160816; b=cO+bUqyN9ZzODO3DcXnr3nn0DmWOZDVHhJYAXO7sfAXabJgvx95rTPuDmYZTx/JNz/ nZ12itfM30zlO47sbUgMjSixcbl0Q1l1fgjZg9eJ2vizn8LO/rdbarSGVssS/nvLAILB YxfVYv7pq5Cyx7Z1UX2+BG/4HLUatif34zy+NPdK/AyhDuNIwU1ILBpBwhUFFjTIeu1Q 7wZUsKypJKhqmGCi1tnFswLL9iwY5bUJFWyIH97h6y8/ehUPNedQ9O1jFDwR2gmT5G1I R3As4EeiyTGRKzHbmAt9m3DerYUBfF9rM+UcQmawq/8Ug+5P1Vrt45m5wCjdg9Flj1yj YmNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=aQoXdp5yfLgc7is0QcvnVS4+acf/NV6YQST1RgDhk1I=; b=D1+nCn55K9QPfPC/qZ1r2retLe6dupzG8HrxQx5RasYUlb9VO5z4tVudGB5VDgU8BW uOrMdZST7GETDBnqID9pTwCp7fpzWNYpWU2jSmhciwNQlF0vbG7J5XqUanqlnn1NsCXz TN7C4l88GAKErSkBb29O9HhP3C/Fx2OzWP/xT26zXhirvxyfWyBffHKDVNnOS7sgzfdh kH7+E4d5xLuWkASvKnQmE/yGT3rB7k9x15aVgqbzwTjvtBUu8z1Wf2f82znatGKAnpEm FQlhVezdH+XxOdITn2koPRPuo5647akhtrdBsGi0+hwJR+f4bS7MIyx3/7Q/z3gvF/HH QoIg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b4-20020adfee84000000b0020ca2ec5bc8si7570810wro.496.2022.05.15.14.02.02; Sun, 15 May 2022 14:02:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232414AbiEOP5Y (ORCPT + 99 others); Sun, 15 May 2022 11:57:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236841AbiEOP5S (ORCPT ); Sun, 15 May 2022 11:57:18 -0400 Received: from smtp.smtpout.orange.fr (smtp07.smtpout.orange.fr [80.12.242.129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B30713F8A for ; Sun, 15 May 2022 08:57:16 -0700 (PDT) Received: from pop-os.home ([86.243.180.246]) by smtp.orange.fr with ESMTPA id qGcCn0Tbaqn1xqGcCnISX0; Sun, 15 May 2022 17:57:15 +0200 X-ME-Helo: pop-os.home X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Sun, 15 May 2022 17:57:15 +0200 X-ME-IP: 86.243.180.246 From: Christophe JAILLET To: Veerasenareddy Burru , Abhijit Ayarekar , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Satananda Burla Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , netdev@vger.kernel.org Subject: [PATCH 1/2] octeon_ep: Fix a memory leak in the error handling path of octep_request_irqs() Date: Sun, 15 May 2022 17:56:44 +0200 Message-Id: <78dcfbb5d22328bc83edbfc74af10c3625c54087.1652629833.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 'oct->non_ioq_irq_names' is not freed in the error handling path of octep_request_irqs(). Add the missing kfree(). Fixes: 37d79d059606 ("octeon_ep: add Tx/Rx processing and interrupt support") Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/marvell/octeon_ep/octep_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c index e020c81f3455..6b60a03574a0 100644 --- a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c +++ b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c @@ -267,6 +267,8 @@ static int octep_request_irqs(struct octep_device *oct) --i; free_irq(oct->msix_entries[i].vector, oct); } + kfree(oct->non_ioq_irq_names); + oct->non_ioq_irq_names = NULL; alloc_err: return -1; } -- 2.34.1