projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c9ddec7
)
Btrfs: fix memory leaks in btrfs_new_inode()
author
Yoshinori Sano
<yoshinori.sano@gmail.com>
Sat, 9 Apr 2011 02:30:07 +0000
(
02:30
+0000)
committer
Chris Mason
<chris.mason@oracle.com>
Tue, 12 Apr 2011 00:25:06 +0000
(20:25 -0400)
This patch fixes memory leaks in btrfs_new_inode().
Signed-off-by: Yoshinori Sano <yoshinori.sano@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/inode.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/inode.c
b/fs/btrfs/inode.c
index cc6022842e0c490911782d8122f1b052a5d5808f..2d1208f964eb0aec8ef143d64f7bcbc896ee29d7 100644
(file)
--- a/
fs/btrfs/inode.c
+++ b/
fs/btrfs/inode.c
@@
-4526,14
+4526,17
@@
static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans,
BUG_ON(!path);
inode = new_inode(root->fs_info->sb);
- if (!inode)
+ if (!inode) {
+ btrfs_free_path(path);
return ERR_PTR(-ENOMEM);
+ }
if (dir) {
trace_btrfs_inode_request(dir);
ret = btrfs_set_inode_index(dir, index);
if (ret) {
+ btrfs_free_path(path);
iput(inode);
return ERR_PTR(ret);
}