nutanix / libvfio-user

framework for emulating devices in userspace
BSD 3-Clause "New" or "Revised" License
164 stars 51 forks source link

clean up msg->out.iov in error cases #777

Open w-henderson opened 1 year ago

w-henderson commented 1 year ago

There are a number of cases where iov_base and iov_len are not cleaned up correctly in error cases, for example leaving a meaningless buffer to be returned, or having iov_base be NULL but iov_len set. This can be cleaned up with iov_free() which will be introduced as part of #746.

See https://github.com/nutanix/libvfio-user/pull/746#discussion_r1311523293 for discussion and more details.