Author: tuexen
Date: Tue Jun 30 21:50:05 2020
New Revision: 362813
URL: https://svnweb.freebsd.org/changeset/base/362813

Log:
  Fix a bug introduced in https://svnweb.freebsd.org/changeset/base/362173
  
  Reported by:          syzbot+f3a6fccfa6ae9d3de...@syzkaller.appspotmail.com
  MFC after:            1 week

Modified:
  head/sys/netinet/sctputil.c

Modified: head/sys/netinet/sctputil.c
==============================================================================
--- head/sys/netinet/sctputil.c Tue Jun 30 21:48:58 2020        (r362812)
+++ head/sys/netinet/sctputil.c Tue Jun 30 21:50:05 2020        (r362813)
@@ -5247,7 +5247,11 @@ sctp_find_ifa_in_ep(struct sctp_inpcb *inp, struct soc
        if (holds_lock == 0) {
                SCTP_INP_RUNLOCK(inp);
        }
-       return (laddr->ifa);
+       if (laddr != NULL) {
+               return (laddr->ifa);
+       } else {
+               return (NULL);
+       }
 }
 
 uint32_t
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to