Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jun 2017 16:13:20 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r319944 - head/sys/netgraph
Message-ID:  <201706141613.v5EGDKiI063021@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Wed Jun 14 16:13:20 2017
New Revision: 319944
URL: https://svnweb.freebsd.org/changeset/base/319944

Log:
  Check return value from soaccept().
  
  Coverity:	1376209

Modified:
  head/sys/netgraph/ng_ksocket.c

Modified: head/sys/netgraph/ng_ksocket.c
==============================================================================
--- head/sys/netgraph/ng_ksocket.c	Wed Jun 14 13:44:32 2017	(r319943)
+++ head/sys/netgraph/ng_ksocket.c	Wed Jun 14 16:13:20 2017	(r319944)
@@ -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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706141613.v5EGDKiI063021>