projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5fe46e9
)
nfs: fix unlikely memory leak
author
Dan Carpenter
<error27@gmail.com>
Sat, 6 Mar 2010 12:02:22 +0000
(15:02 +0300)
committer
Trond Myklebust
<Trond.Myklebust@netapp.com>
Mon, 8 Mar 2010 19:10:00 +0000
(14:10 -0500)
I'll admit that it's unlikely for the first allocation to fail and
the second one to succeed. I won't be offended if you ignore this
patch.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4proc.c
patch
|
blob
|
history
diff --git
a/fs/nfs/nfs4proc.c
b/fs/nfs/nfs4proc.c
index eda74c42d552a044b5ba3b8541b9034cc29afff8..f9254fb0c9d0c11750ab8406edb4b1774604a63b 100644
(file)
--- a/
fs/nfs/nfs4proc.c
+++ b/
fs/nfs/nfs4proc.c
@@
-5107,6
+5107,7
@@
static int nfs41_proc_async_sequence(struct nfs_client *clp,
res = kzalloc(sizeof(*res), GFP_KERNEL);
if (!args || !res) {
kfree(args);
+ kfree(res);
nfs_put_client(clp);
return -ENOMEM;
}