HomeFreeBSD

MFC r307745

Description

MFC r307745

In sendit(), if mp->msg_control is present, then in sockargs() we are
allocating mbuf to store mp->msg_control. Later in kern_sendit(), call
to getsock_cap(), will check validity of file pointer passed, if this
fails EBADF is returned but mbuf allocated in sockargs() is not freed.
Made code changes to free the same.

Since freeing control mbuf in sendit() after checking (control != NULL)
may lead to double freeing of control mbuf in sendit(), we can free
control mbuf in kern_sendit() if there are any errors in the routine.

Submitted by: Lohith Bellad <lohith.bellad@me.com>

Details

Committed
hirenDec 11 2016, 11:36 PM
Parents
rS309858: We currently don't do TSO if ip options are present. In case of IPv6, we look at
Branches
Unknown
Tags
Unknown