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)
commitfd1ef88049de09bc70d60b549992524cfc0e66ff
tree5680ee3af233c29ea9d5949faea29b72b9fbb70b
parent4ab3442ca384a02abf8b1f2b3449a6c547851873
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: 6ee95d1c8991 ("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