svn commit: r252981 - stable/8/sys/kern

Michael Tuexen tuexen at FreeBSD.org
Sun Jul 7 18:31:03 UTC 2013


Author: tuexen
Date: Sun Jul  7 18:31:02 2013
New Revision: 252981
URL: http://svnweb.freebsd.org/changeset/base/252981

Log:
  MFC r248172 (partially):
  Return an error if sctp_peeloff() fails because a socket can't be allocated.

Modified:
  stable/8/sys/kern/uipc_syscalls.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/kern/uipc_syscalls.c
==============================================================================
--- stable/8/sys/kern/uipc_syscalls.c	Sun Jul  7 18:21:30 2013	(r252980)
+++ stable/8/sys/kern/uipc_syscalls.c	Sun Jul  7 18:31:02 2013	(r252981)
@@ -2320,8 +2320,10 @@ sctp_peeloff(td, uap)
 
 	CURVNET_SET(head->so_vnet);
 	so = sonewconn(head, SS_ISCONNECTED);
-	if (so == NULL) 
+	if (so == NULL) {
+		error = ENOMEM;
 		goto noconnection;
+	}
 	/*
 	 * Before changing the flags on the socket, we have to bump the
 	 * reference count.  Otherwise, if the protocol calls sofree(),


More information about the svn-src-stable-8 mailing list