diff options
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_divert.c | 5 | ||||
-rw-r--r-- | sys/netinet/tcp_subr.c | 4 | ||||
-rw-r--r-- | sys/netinet/tcp_timewait.c | 4 | ||||
-rw-r--r-- | sys/netinet/udp_usrreq.c | 4 |
4 files changed, 13 insertions, 4 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index ee1f97c..a7097a2 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -588,7 +588,10 @@ div_pcblist(SYSCTL_HANDLER_ARGS) n = divcbinfo.ipi_count; INP_INFO_RUNLOCK(&divcbinfo); - sysctl_wire_old_buffer(req, 2 * sizeof(xig) + n*sizeof(struct xinpcb)); + error = sysctl_wire_old_buffer(req, + 2 * sizeof(xig) + n*sizeof(struct xinpcb)); + if (error != 0) + return (error); xig.xig_len = sizeof xig; xig.xig_count = n; diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 210a582..10d0cd6 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -859,8 +859,10 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) INP_INFO_RUNLOCK(&tcbinfo); splx(s); - sysctl_wire_old_buffer(req, 2 * (sizeof xig) + error = sysctl_wire_old_buffer(req, 2 * (sizeof xig) + n * sizeof(struct xtcpcb)); + if (error != 0) + return (error); xig.xig_len = sizeof xig; xig.xig_count = n; diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index 210a582..10d0cd6 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -859,8 +859,10 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS) INP_INFO_RUNLOCK(&tcbinfo); splx(s); - sysctl_wire_old_buffer(req, 2 * (sizeof xig) + error = sysctl_wire_old_buffer(req, 2 * (sizeof xig) + n * sizeof(struct xtcpcb)); + if (error != 0) + return (error); xig.xig_len = sizeof xig; xig.xig_count = n; diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index f0a01b2..adef1f8 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -604,8 +604,10 @@ udp_pcblist(SYSCTL_HANDLER_ARGS) INP_INFO_RUNLOCK(&udbinfo); splx(s); - sysctl_wire_old_buffer(req, 2 * (sizeof xig) + error = sysctl_wire_old_buffer(req, 2 * (sizeof xig) + n * sizeof(struct xinpcb)); + if (error != 0) + return (error); xig.xig_len = sizeof xig; xig.xig_count = n; |