projects
/
deliverable
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef6ada3
)
[LogFS] Plug memory leak on error paths
author
Joern Engel
<joern@logfs.org>
Mon, 23 Nov 2009 13:29:12 +0000
(14:29 +0100)
committer
Joern Engel
<joern@logfs.org>
Mon, 23 Nov 2009 13:29:12 +0000
(14:29 +0100)
Spotted by Dan Carpenter.
fs/logfs/dir.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/logfs/dir.c
b/fs/logfs/dir.c
index 89104e6f81c44237c7a34d3ef8f6b6ed5957a91e..e7659b15a907d71d8888821c3b58a669c90b0c52 100644
(file)
--- a/
fs/logfs/dir.c
+++ b/
fs/logfs/dir.c
@@
-224,10
+224,14
@@
static int logfs_unlink(struct inode *dir, struct dentry *dentry)
inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
page = logfs_get_dd_page(dir, dentry);
- if (!page)
+ if (!page) {
+ kfree(ta);
return -ENOENT;
- if (IS_ERR(page))
+ }
+ if (IS_ERR(page)) {
+ kfree(ta);
return PTR_ERR(page);
+ }
index = page->index;
page_cache_release(page);
This page took
0.026457 seconds
and
5
git commands to generate.