}
memset(nfsfh, 0, sizeof(struct nfsfh));
- /* steal the filehandle */
- nfsfh->fh.data.data_len = data->fh.data.data_len;
- nfsfh->fh.data.data_val = data->fh.data.data_val;
- data->fh.data.data_val = NULL;
+ /* copy the filehandle */
+ nfsfh->fh.data.data_len = res->LOOKUP3res_u.resok.object.data.data_len;
+ nfsfh->fh.data.data_val = malloc(nfsfh->fh.data.data_len);
+ memcpy(nfsfh->fh.data.data_val, res->LOOKUP3res_u.resok.object.data.data_val, nfsfh->fh.data.data_len);
data->cb(0, nfs, nfsfh, data->private_data);
free_nfs_cb_data(data);