When guest mappings were being released the start index for the IOV
array was not correct it started from zero instead of the startIndex.
For meta packet the start index is zero, but for data packets it
is 16.
Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
}
if (iovMapped > 1) {
- /* Seems like more than one page was requested. */
uint32 copiedAmount = 0;
uint32 copyAmount;
int32 remainingSize;
int i;
+
+ /* Seems like more than one page was requested. */
ASSERT_DEVEL(packet->iov[startIndex].len < bufSize);
*buf = Util_SafeMalloc(bufSize);
*isAllocated = TRUE;
}
freeMem:
- for (i = 0; i < iovCount; i++) {
+ for (i = startIndex; i < iovCount; i++) {
session->channelCbTable->putVa(&packet->iov[i].token);
packet->iov[i].va = NULL;
}