diff options
author | 2020-01-13 16:23:07 +0300 | |
---|---|---|
committer | 2020-02-06 11:22:55 -0500 | |
commit | 91fd3c3edcd7f223c5340a8324f67b03a85a73aa (patch) | |
tree | caa03958f1e6e725e07530ed3354be5353c4cd56 /fs/nfsd/nfs4proc.c | |
parent | nfsd: convert file cache to use over/underflow safe refcount (diff) | |
download | linux-91fd3c3edcd7f223c5340a8324f67b03a85a73aa.tar.gz linux-91fd3c3edcd7f223c5340a8324f67b03a85a73aa.tar.bz2 linux-91fd3c3edcd7f223c5340a8324f67b03a85a73aa.zip |
nfsd4: fix double free in nfsd4_do_async_copy()
This frees "copy->nf_src" before and again after the goto.
Fixes: ce0887ac96d3 ("NFSD add nfs4 inter ssc to nfsd4_copy")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r-- | fs/nfsd/nfs4proc.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index e4ddaf87493a..0e75f7fb5fec 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -1469,7 +1469,6 @@ static int nfsd4_do_async_copy(void *data) copy->nf_src->nf_file = nfs42_ssc_open(copy->ss_mnt, ©->c_fh, ©->stateid); if (IS_ERR(copy->nf_src->nf_file)) { - kfree(copy->nf_src); copy->nfserr = nfserr_offload_denied; nfsd4_interssc_disconnect(copy->ss_mnt); goto do_callback; |