Commit 91fd3c3e authored by Dan Carpenter's avatar Dan Carpenter Committed by J. Bruce Fields

nfsd4: fix double free in nfsd4_do_async_copy()

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

Fixes: ce0887ac ("NFSD add nfs4 inter ssc to nfsd4_copy")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarOlga Kornievskaia <kolga@netapp.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 689827cd
...@@ -1469,7 +1469,6 @@ static int nfsd4_do_async_copy(void *data) ...@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment