Skip to content

Commit

Permalink
nfs: fix unlikely memory leak
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Trond Myklebust committed Mar 8, 2010
1 parent 5fe46e9 commit 7dd08a5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7dd08a5

Please sign in to comment.