projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b2b2d3
)
Btrfs: fix memory leak in start_transaction()
author
Yoshinori Sano
<yoshinori.sano@gmail.com>
Sun, 3 Apr 2011 12:31:28 +0000
(12:31 +0000)
committer
Chris Mason
<chris.mason@oracle.com>
Tue, 5 Apr 2011 05:19:43 +0000
(
01:19
-0400)
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>
fs/btrfs/transaction.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/transaction.c
b/fs/btrfs/transaction.c
index ce48eb59d6156dd72b8cfe4344e50411abe47d98..d01cc249a8d36188986fa70b073b054c550cf937 100644
(file)
--- 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);