From 7737de9515464df271f509e3ee5d34b766195d24 Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Wed, 14 Jun 2017 16:13:20 +0000 Subject: [PATCH] Check return value from soaccept(). Coverity: 1376209 --- sys/netgraph/ng_ksocket.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netgraph/ng_ksocket.c b/sys/netgraph/ng_ksocket.c index 0e551775afa5..cbfded714eb9 100644 --- a/sys/netgraph/ng_ksocket.c +++ b/sys/netgraph/ng_ksocket.c @@ -1184,7 +1184,8 @@ ng_ksocket_accept(priv_p priv) if (error) return (error); - soaccept(so, &sa); + if ((error = soaccept(so, &sa)) != 0) + return (error); len = OFFSETOF(struct ng_ksocket_accept, addr); if (sa != NULL)