From patchwork Mon Oct 26 10:28:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhaolei X-Patchwork-Id: 7486861 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D55F09F36A for ; Mon, 26 Oct 2015 10:30:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1D3AF207D4 for ; Mon, 26 Oct 2015 10:30:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 494732071C for ; Mon, 26 Oct 2015 10:30:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753892AbbJZKaH (ORCPT ); Mon, 26 Oct 2015 06:30:07 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:48063 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753848AbbJZKaG (ORCPT ); Mon, 26 Oct 2015 06:30:06 -0400 X-IronPort-AV: E=Sophos;i="5.15,520,1432569600"; d="scan'208";a="102287532" Received: from bogon (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 26 Oct 2015 18:32:20 +0800 Received: from G08CNEXCHPEKD01.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id t9QATWu1004085 for ; Mon, 26 Oct 2015 18:29:32 +0800 Received: from localhost.localdomain (10.167.226.114) by G08CNEXCHPEKD01.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server id 14.3.181.6; Mon, 26 Oct 2015 18:30:04 +0800 From: Zhao Lei To: CC: Zhao Lei Subject: [PATCH v2 4/5] btrfs-progs: Add missing close_ctree to btrfs-select-super.c Date: Mon, 26 Oct 2015 18:28:21 +0800 Message-ID: <22e13c15523f1920e249761ae8a737dd66192f0f.1445855131.git.zhaolei@cn.fujitsu.com> X-Mailer: git-send-email 1.8.5.1 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add missing close_ctree() to btrfs-select-super.c to avoid memory leak. Signed-off-by: Zhao Lei --- btrfs-select-super.c | 1 + 1 file changed, 1 insertion(+) diff --git a/btrfs-select-super.c b/btrfs-select-super.c index bd44978..df74153 100644 --- a/btrfs-select-super.c +++ b/btrfs-select-super.c @@ -102,6 +102,7 @@ int main(int ac, char **av) */ printf("using SB copy %llu, bytenr %llu\n", (unsigned long long)num, (unsigned long long)bytenr); + close_ctree(root); btrfs_close_all_devices(); return ret; }