]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: Fix a memory leak in an error handling path
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 1 Sep 2022 05:27:04 +0000 (07:27 +0200)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 26 Sep 2022 18:02:21 +0000 (14:02 -0400)
commita396e5f29441061c7ba143b75f0b4022d173ab6a
tree5680ee3af233c29ea9d5949faea29b72b9fbb70b
parent81d8c2652892ece77a0c17ce8a50fd66231971d1
nfsd: Fix a memory leak in an error handling path

If this memdup_user() call fails, the memory allocated in a previous call
a few lines above should be freed. Otherwise it leaks.

Fixes: 3bf84b31af3b ("nfsd: add support for upcall version 2")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/nfs4recover.c