From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.cn.fujitsu.com ([183.91.158.132]:48248 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754293AbdLTExd (ORCPT ); Tue, 19 Dec 2017 23:53:33 -0500 From: Su Yue To: CC: , Subject: [PATCH v2 01/17] btrfs-progs: lowmem check: release path in repair_extent_data_item() Date: Wed, 20 Dec 2017 12:57:15 +0800 Message-ID: <20171220045731.19343-2-suy.fnst@cn.fujitsu.com> In-Reply-To: <20171220045731.19343-1-suy.fnst@cn.fujitsu.com> References: <20171220045731.19343-1-suy.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-btrfs-owner@vger.kernel.org List-ID: In repair_extent_data_item(), path is not be released if some errors occurs which causes extent buffer leak. So release path in end of the function. Signed-off-by: Su Yue --- cmds-check.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cmds-check.c b/cmds-check.c index 7fc30da83ea1..309ac9553b3a 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -11999,6 +11999,7 @@ static int repair_extent_data_item(struct btrfs_trans_handle *trans, err &= ~BACKREF_MISSING; out: + btrfs_release_path(&path); if (ret) error("can't repair root %llu extent data item[%llu %llu]", root->objectid, disk_bytenr, num_bytes); -- 2.15.1