linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs: Fix a memory leak in btrfs_ioctl_balance()
@ 2022-04-21  9:51 Haowen Bai
  2022-04-21 10:01 ` Qu Wenruo
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Haowen Bai @ 2022-04-21  9:51 UTC (permalink / raw)
  To: Chris Mason, Josef Bacik, David Sterba
  Cc: Haowen Bai, linux-btrfs, linux-kernel

Free "bargs" before return.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
 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 = -EINPROGRESS;
-			goto out;
+			goto out_bargs;
 		}
 	} else {
 		/* this is (1) */
 		mutex_unlock(&fs_info->balance_mutex);
 		ret = BTRFS_ERROR_DEV_EXCL_RUN_IN_PROGRESS;
-		goto out;
+		goto out_bargs;
 	}
 
 locked:
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-04-22 21:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21  9:51 [PATCH] btrfs: Fix a memory leak in btrfs_ioctl_balance() Haowen Bai
2022-04-21 10:01 ` Qu Wenruo
2022-04-21 10:47 ` Filipe Manana
2022-04-21 11:21 ` Nikolay Borisov
2022-04-21 11:25   ` Nikolay Borisov
2022-04-21 11:34     ` Nikolay Borisov
2022-04-21 13:30       ` David Sterba
2022-04-21 11:41     ` Qu Wenruo
2022-04-21 17:35 ` kernel test robot
2022-04-22 20:28 ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).