Skip to content

Commit

Permalink
uio: Let freeuio(NULL) work
Browse files Browse the repository at this point in the history
In FreeBSD this works, and some cleanup paths depend on it.
  • Loading branch information
markjdb authored and bsdjhb committed Mar 13, 2024
1 parent b6eeda6 commit 35f9985
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sys/kern/subr_uio.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,8 @@ allocuio(u_int iovcnt)
void
freeuio(struct uio *uio)
{
if (uio == NULL)
return;
if (uio->uio_flags & UIO_EXT_IOVEC) {
#ifdef __CHERI_PURE_CAPABILITY__
KASSERT(cheri_is_address_inbounds(uio->uio_ext_iov,
Expand Down

0 comments on commit 35f9985

Please sign in to comment.