aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-03-06 07:02:22 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-03-08 14:10:00 -0500
commit7dd08a570dcf45d52155996fee688405635ee481 (patch)
tree7458eddbaabf695fbaadbbc35d7deb71bfa45ab5
parent5fe46e9d733f19a880ef7e516002bd4c2b833e14 (diff)
nfs: fix unlikely memory leak
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>
-rw-r--r--fs/nfs/nfs4proc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index eda74c42d552..f9254fb0c9d0 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -5107,6 +5107,7 @@ static int nfs41_proc_async_sequence(struct nfs_client *clp,
5107 res = kzalloc(sizeof(*res), GFP_KERNEL); 5107 res = kzalloc(sizeof(*res), GFP_KERNEL);
5108 if (!args || !res) { 5108 if (!args || !res) {
5109 kfree(args); 5109 kfree(args);
5110 kfree(res);
5110 nfs_put_client(clp); 5111 nfs_put_client(clp);
5111 return -ENOMEM; 5112 return -ENOMEM;
5112 } 5113 }