Silence a Coverity warning from scanning the usrsctp library.

MFC after:	3 days
This commit is contained in:
Michael Tuexen 2017-09-09 20:08:26 +00:00
parent d87eabeea9
commit 0c4622dab2

View File

@ -2919,9 +2919,9 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *addr,
*/
/* got to be root to get at low ports */
if (ntohs(lport) < IPPORT_RESERVED) {
if (p && (error =
if ((p != NULL) && ((error =
priv_check(p, PRIV_NETINET_RESERVEDPORT)
)) {
) != 0)) {
SCTP_INP_DECR_REF(inp);
SCTP_INP_WUNLOCK(inp);
SCTP_INP_INFO_WUNLOCK();