Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2591381pxu; Mon, 14 Dec 2020 06:23:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJyq9KIxy4qRA+Y8CHpZoIfbcU+bSIr7hj02Mn9/XZVn6nMyzWBPyv9HSC98f7s6vPGAwX+r X-Received: by 2002:aa7:c2d8:: with SMTP id m24mr10408476edp.300.1607955832200; Mon, 14 Dec 2020 06:23:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607955832; cv=none; d=google.com; s=arc-20160816; b=TbAMoyGzfuJt5RklJbnMcPgznBlkFZfBbnEHDi5maMP5qdwppKF3naiiCqcyfecu7H PP2qZd86IqTSbr5DtmNOXAB5ikJzKJlNqVPD1gsZ6ZviiQoM2uU/cTwROGK9g1Dsr51K tT4iau/EUIbF7W7CET+i3IKKpFDMDD5uUiaSlcG8CssnMt5xOYhGo/x4u3Bb7jkf7lDB yMpCZnaC0t41LzDmNZoh4c77iUhhnPD5ACt/LS1S77bCuJ6RnFEJlb2J69uN9ibV75V1 6KopRbFcPuXlCIgsYqA4/Xtsv9gehINR/rorJVbnqZgzrozgv3RbVTG4+7u/SEfxa0ho lPpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=XI8TdlR3KcMv59VM3giX3zxtKyG7BK96h7ee6Dtc+Hc=; b=WYUFeIr8OdsSt+NlEfiEWRxS/IiBByEKboUZMJr3EucD2PBagVdroRbrKepa92u9Is 9q9V1PymFGayKlpc0pby79lVTH1Ac9lu6CYcmMbwkFuCdG4+wuZeMvVskU2FThVy0ECe QryVORbv74owEXRDkE/kQuJlQad20sh2ufxscJVK6+Cq2MuTiS068KIeyWEluDO/62XX I0QUGOjYRKMHOPoyEkmRo35BS/qJ5lgImm597ihczmRPAHyzPyJ4o3C+4RlKEX1TQWG9 FrDMA7kAzFyVH+/eDwOxv7B5ShUtHBST7QIvBcW4su93RnGgebF30fcOdBGhSOIorksy 4vJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f15si9843848ejr.2.2020.12.14.06.23.27; Mon, 14 Dec 2020 06:23:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725911AbgLNJth (ORCPT + 99 others); Mon, 14 Dec 2020 04:49:37 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:45705 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726775AbgLNJtO (ORCPT ); Mon, 14 Dec 2020 04:49:14 -0500 Received: by mail-lf1-f66.google.com with SMTP id x20so9010827lfe.12 for ; Mon, 14 Dec 2020 01:48:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=XI8TdlR3KcMv59VM3giX3zxtKyG7BK96h7ee6Dtc+Hc=; b=bpdamnk1VbV1SZYhOCdKrUP2xTC33YYi/V8QvulW8+GXdgLC0sjMXPRQuWpscngDCw P3mdd8O+dfdBh4ioOusDQ9l0jCMxymH2OeCXCfdHTbchJ86VVs+xmx8eZbT1CJwujKmm gxqF5Yk8MAhk/I2A6E350fEtJAFRnQ8eV1Q8KCG0yA6U2UN5baUmyowpGzOu/xvv5j0P mi2mD9nVPoP2CEHmavDNgGGgbyLArBZB/eF1TIpKB/vG8Po3cTBnq3cIc0+N/A86wLVC eOj+pwcgbwM7Huj84dnVX1KsjvtIZ/eavYd+VrMweNI1QlirWg4KYkynDujhjBhysOhE swKQ== X-Gm-Message-State: AOAM531OWBBOhrhgsncVrJ8msZW9v6r6w1Pz9qsfGW8au/Sa3A5Uc1Ki 1U378ECeUD82xGGLmCKiIvskQoLGk6s45g== X-Received: by 2002:a2e:4c11:: with SMTP id z17mr8151164lja.364.1607939312667; Mon, 14 Dec 2020 01:48:32 -0800 (PST) Received: from xi.terra (c-b3cbe455.07-184-6d6c6d4.bbcust.telenor.se. [85.228.203.179]) by smtp.gmail.com with ESMTPSA id f19sm1795161ljm.7.2020.12.14.01.48.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Dec 2020 01:48:31 -0800 (PST) Received: from johan by xi.terra with local (Exim 4.93.0.4) (envelope-from ) id 1kokSx-0006f4-S3; Mon, 14 Dec 2020 10:48:27 +0100 Date: Mon, 14 Dec 2020 10:48:27 +0100 From: Johan Hovold To: "wanghai (M)" Cc: Johan Hovold , vaibhav.sr@gmail.com, elder@kernel.org, gregkh@linuxfoundation.org, dan.carpenter@oracle.com, aibhav.sr@gmail.com, greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: greybus: audio: Fix possible leak free widgets in gbaudio_dapm_free_controls Message-ID: References: <20201205103827.31244-1-wanghai38@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 11, 2020 at 08:29:22PM +0800, wanghai (M) wrote: > > 在 2020/12/8 17:35, Johan Hovold 写道: > > On Sat, Dec 05, 2020 at 06:38:27PM +0800, Wang Hai wrote: > >> In gbaudio_dapm_free_controls(), if one of the widgets is not found, an error > >> will be returned directly, which will cause the rest to be unable to be freed, > >> resulting in leak. > >> > >> This patch fixes the bug. If if one of them is not found, just skip and free the others. > > Apart from the typo, please break your lines at 72 columns or so (not > > needed for the Fixes tag). > > Thanks for review,  Do I need to send a v2 patch to change the commit msg? I'm not sure your mail reached the lists since it contains HTML, but to answer your question: Please do resend. If you can make the maintainers' life any easier that's always a good idea. You should include the Reviewed-by tags you've gotten so far when resending as long as you only update the commit message. Johan