nfsd4: fix double free in nfsd4_do_async_copy()

This frees "copy->nf_src" before and again after the goto.

Fixes: ce0887ac96 ("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>
This commit is contained in:
Dan Carpenter 2020-01-13 16:23:07 +03:00 committed by J. Bruce Fields
parent 689827cd5b
commit 91fd3c3edc
1 changed files with 0 additions and 1 deletions

View File

@ -1469,7 +1469,6 @@ static int nfsd4_do_async_copy(void *data)
copy->nf_src->nf_file = nfs42_ssc_open(copy->ss_mnt, &copy->c_fh, copy->nf_src->nf_file = nfs42_ssc_open(copy->ss_mnt, &copy->c_fh,
&copy->stateid); &copy->stateid);
if (IS_ERR(copy->nf_src->nf_file)) { if (IS_ERR(copy->nf_src->nf_file)) {
kfree(copy->nf_src);
copy->nfserr = nfserr_offload_denied; copy->nfserr = nfserr_offload_denied;
nfsd4_interssc_disconnect(copy->ss_mnt); nfsd4_interssc_disconnect(copy->ss_mnt);
goto do_callback; goto do_callback;