K 10 svn:author V 5 hiren K 8 svn:date V 27 2016-10-21T18:27:30.554136Z K 7 svn:log V 714 Rework r306337. 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 Reviewed by: glebius MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D8152 END