summaryrefslogtreecommitdiffstats
path: root/contrib/netbsd-tests/lib/libc/sys/t_access.c
diff options
context:
space:
mode:
authorhiren <hiren@FreeBSD.org>2016-12-11 23:36:11 +0000
committerhiren <hiren@FreeBSD.org>2016-12-11 23:36:11 +0000
commit1eeb0f27b3d3f071a890977939889094c797ebf6 (patch)
tree4dceca83e3f5849abef52da723b225d34c57cfd5 /contrib/netbsd-tests/lib/libc/sys/t_access.c
parented4347f3e35e20d8ec5e82535d4f94a6ea5ac498 (diff)
downloadFreeBSD-src-1eeb0f27b3d3f071a890977939889094c797ebf6.zip
FreeBSD-src-1eeb0f27b3d3f071a890977939889094c797ebf6.tar.gz
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>
Diffstat (limited to 'contrib/netbsd-tests/lib/libc/sys/t_access.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud