mirror of https://gitlab.com/qemu-project/qemu
bsd-user/freebsd/os-syscall.c: unlock_iovec
Releases the references to the iovec created by lock_iovec. Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
1ed771b21c
commit
883808d848
|
@ -175,6 +175,20 @@ fail2:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void unlock_iovec(struct iovec *vec, abi_ulong target_addr,
|
||||||
|
int count, int copy)
|
||||||
|
{
|
||||||
|
struct target_iovec *target_vec;
|
||||||
|
|
||||||
|
target_vec = lock_user(VERIFY_READ, target_addr,
|
||||||
|
count * sizeof(struct target_iovec), 1);
|
||||||
|
if (target_vec) {
|
||||||
|
helper_unlock_iovec(target_vec, target_addr, vec, count, copy);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_free(vec);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* do_syscall() should always have a single exit point at the end so that
|
* do_syscall() should always have a single exit point at the end so that
|
||||||
* actions, such as logging of syscall results, can be performed. All errnos
|
* actions, such as logging of syscall results, can be performed. All errnos
|
||||||
|
|
Loading…
Reference in New Issue