Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp932588pxv; Thu, 15 Jul 2021 20:21:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKdcGHkkkTkFkjuSMHCgWq2TiHu6XxffaZkTID3/sjsTYackten9NEKMWPwRbjOao7GKaI X-Received: by 2002:a17:907:76e6:: with SMTP id kg6mr9580993ejc.320.1626405705653; Thu, 15 Jul 2021 20:21:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626405705; cv=none; d=google.com; s=arc-20160816; b=LQJbuBaG/ng/91Dxa0M8MHouxPcqR7WQir+o01yEt8FbVnnqIRI4aoU7gL4YiuLBLh lByTKYQPzvPUSflZo7bFn7cQn1aiuLHJQPf7JNtUR01NvxouYgzehOxTYgnQopIHiK3J kr5l33JtGVepNt/AwqV4BxJYoQCTpMe3IZtFNN9UwrU/9kivjMJ8+lpXUsnJOsz93MX+ Z3XyRQvTmK5NHXKZ7J9O2J8RJDP90oN/ggGa9KbZWzxp6+vQgkMTQAD4IUxqSDPYqKK6 nkHKNoDi0VVahOxN4Bhv7PMlvhwZi91NFINZxJwBGVGoeqLTe7PYg74Gevb90eyuMUS2 osPA== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=e2XLXyzu+J6rtRmTy7ujougvvoMcU6v7p7flHSpayko=; b=BYJKjBW5haNlaQIoM2UgwaArUdohJ4JAbsyA48TPEUZEyJV5smfMgPPy8xFSHnzgTk UuvfZYQ6TUw/PcSBxnWPdVCb3qUULu+GxBvxToVwRUbWu9SEu3DgoXCs4ROzBcfTmkUV i7Dm8iU82SZKD6SziG1wdmTvTUWMYP1iQfttE7H3AXNCdRmxgbj+77vjzYMiar4n94Su Ho+Qslbk9madkH3wVI0Bvs0OXyNi/Q/rAAOob5qtRhpYUf0m6tDUjYm3dHA+Evpo2n+x ke3CCvKNMGFzq2X0cbORFH4F0Hx3es8Z4RbvFM749TfGku9OaXwHeTQERio1juALYaZl 4USA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v18si9852136edr.159.2021.07.15.20.21.22; Thu, 15 Jul 2021 20:21:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231253AbhGPDXx (ORCPT + 99 others); Thu, 15 Jul 2021 23:23:53 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:36673 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231230AbhGPDXx (ORCPT ); Thu, 15 Jul 2021 23:23:53 -0400 Received: from callcc.thunk.org (96-65-121-81-static.hfc.comcastbusiness.net [96.65.121.81]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 16G3KpEk018819 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Jul 2021 23:20:52 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 1419D4202F5; Thu, 15 Jul 2021 23:20:51 -0400 (EDT) Date: Thu, 15 Jul 2021 23:20:50 -0400 From: "Theodore Y. Ts'o" To: wuguanghao Cc: linux-ext4@vger.kernel.org, artem.blagodarenko@gmail.com, liuzhiqiang26@huawei.com, linfeilong@huawei.com Subject: Re: [PATCH v2 03/12] zap_sector: fix memory leak Message-ID: References: <20210630082724.50838-2-wuguanghao3@huawei.com> <20210630082724.50838-4-wuguanghao3@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210630082724.50838-4-wuguanghao3@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Jun 30, 2021 at 04:27:15PM +0800, wuguanghao wrote: > In zap_sector(), need free buf before return, > otherwise it will cause memory leak. > > Signed-off-by: Wu Guanghao > Signed-off-by: Zhiqiang Liu > Reviewed-by: Wu Bo Thanks, applied. - Ted