X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=lib%2Flibnfs.c;h=8d27a816b0fa079b6a28a090aa764a99767b08f1;hb=5e9910f0f0b2a1c71a08e910e7123efcadef46bf;hp=996b9880a91c232d8627b1470fa7b658046032d5;hpb=1e8994af0fde29bb03c52c5c4a972ef8d8ddbc33;p=deb_libnfs.git diff --git a/lib/libnfs.c b/lib/libnfs.c index 996b988..8d27a81 100644 --- a/lib/libnfs.c +++ b/lib/libnfs.c @@ -890,6 +890,7 @@ static void nfs_pread_mcb(struct rpc_context *rpc _U_, int status, void *command data->nfsfh->offset = data->max_offset; data->cb(data->max_offset - data->start_offset, nfs, data->buffer, data->private_data); + free_nfs_cb_data(data); free(mdata); } @@ -925,6 +926,7 @@ int nfs_pread_async(struct nfs_context *nfs, struct nfsfh *nfsfh, off_t offset, * reads and collect into a reassembly buffer. * we send all reads in parallell so that performance is still good. */ + data->max_offset = offset; data->start_offset = offset; data->buffer = malloc(count);