From nobody Sun May 10 23:27:33 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B310FC433FE for ; Thu, 21 Apr 2022 09:51:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387917AbiDUJyS (ORCPT ); Thu, 21 Apr 2022 05:54:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1387912AbiDUJyK (ORCPT ); Thu, 21 Apr 2022 05:54:10 -0400 Received: from mail.meizu.com (edge07.meizu.com [112.91.151.210]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D0BD245BE; Thu, 21 Apr 2022 02:51:21 -0700 (PDT) Received: from IT-EXMB-1-125.meizu.com (172.16.1.125) by mz-mail11.meizu.com (172.16.1.15) with Microsoft SMTP Server (TLS) id 14.3.487.0; Thu, 21 Apr 2022 17:51:20 +0800 Received: from meizu.meizu.com (172.16.137.70) by IT-EXMB-1-125.meizu.com (172.16.1.125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.14; Thu, 21 Apr 2022 17:51:19 +0800 From: Haowen Bai To: Chris Mason , Josef Bacik , David Sterba CC: Haowen Bai , , Subject: [PATCH] btrfs: Fix a memory leak in btrfs_ioctl_balance() Date: Thu, 21 Apr 2022 17:51:17 +0800 Message-ID: <1650534677-31554-1-git-send-email-baihaowen@meizu.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [172.16.137.70] X-ClientProxiedBy: IT-EXMB-1-126.meizu.com (172.16.1.126) To IT-EXMB-1-125.meizu.com (172.16.1.125) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Free "bargs" before return. Signed-off-by: Haowen Bai Reported-by: kernel test robot --- fs/btrfs/ioctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index f08233c2b0b2..d4c8bea914b7 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -4389,13 +4389,13 @@ static long btrfs_ioctl_balance(struct file *file, = void __user *arg) /* this is (2) */ mutex_unlock(&fs_info->balance_mutex); ret =3D -EINPROGRESS; - goto out; + goto out_bargs; } } else { /* this is (1) */ mutex_unlock(&fs_info->balance_mutex); ret =3D BTRFS_ERROR_DEV_EXCL_RUN_IN_PROGRESS; - goto out; + goto out_bargs; } =20 locked: --=20 2.7.4