git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
sunrpc/cache: fix module refcnt leak in a failure path
[safe/jmp/linux-2.6]
/
net
/
sunrpc
/
cache.c
diff --git
a/net/sunrpc/cache.c
b/net/sunrpc/cache.c
index
3e1ef8b
..
a3f340c
100644
(file)
--- a/
net/sunrpc/cache.c
+++ b/
net/sunrpc/cache.c
@@
-1244,8
+1244,10
@@
static int content_open(struct inode *inode, struct file *file,
if (!cd || !try_module_get(cd->owner))
return -EACCES;
han = __seq_open_private(file, &cache_content_op, sizeof(*han));
- if (han == NULL)
+ if (han == NULL) {
+ module_put(cd->owner);
return -ENOMEM;
+ }
han->cd = cd;
return 0;