diff options
author | Yoshinori Sano <yoshinori.sano@gmail.com> | 2011-04-03 14:31:28 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-04-05 07:19:43 +0200 |
commit | 6e8df2ae89ab37730c0062782f844c66ecfc97a7 (patch) | |
tree | 4172619b01d817440d43807da8baec77a14d39d2 /fs/btrfs/transaction.c | |
parent | Btrfs: fix memory leak in btrfs_ioctl_start_sync() (diff) | |
download | linux-6e8df2ae89ab37730c0062782f844c66ecfc97a7.tar.xz linux-6e8df2ae89ab37730c0062782f844c66ecfc97a7.zip |
Btrfs: fix memory leak in start_transaction()
Free btrfs_trans_handle when join_transaction() fails
in start_transaction()
Signed-off-by: Yoshinori Sano <yoshinori.sano@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to '')
-rw-r--r-- | fs/btrfs/transaction.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index ce48eb59d615..d01cc249a8d3 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -197,6 +197,7 @@ again: ret = join_transaction(root); if (ret < 0) { + kmem_cache_free(btrfs_trans_handle_cachep, h); if (type != TRANS_JOIN_NOLOCK) mutex_unlock(&root->fs_info->trans_mutex); return ERR_PTR(ret); |