svn commit: r283717 - stable/10/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Fri May 29 12:27:46 UTC 2015
Author: tuexen
Date: Fri May 29 12:27:45 2015
New Revision: 283717
URL: https://svnweb.freebsd.org/changeset/base/283717
Log:
MFC r277347:
Add protection code to free memory in case of processing an address which
is neither IPv4 or IPv6.
Reported by: Coverity
CID: 749311
Modified:
stable/10/sys/netinet/sctp_asconf.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/netinet/sctp_asconf.c
==============================================================================
--- stable/10/sys/netinet/sctp_asconf.c Fri May 29 12:25:11 2015 (r283716)
+++ stable/10/sys/netinet/sctp_asconf.c Fri May 29 12:27:45 2015 (r283717)
@@ -3346,6 +3346,11 @@ sctp_asconf_send_nat_state_update(struct
TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next);
break;
#endif
+ default:
+ SCTPDBG(SCTP_DEBUG_ASCONF1,
+ "sctp_asconf_send_nat_state_update: unknown address family\n");
+ SCTP_FREE(aa, SCTP_M_ASC_ADDR);
+ return;
}
SCTP_MALLOC(aa, struct sctp_asconf_addr *, sizeof(*aa),
SCTP_M_ASC_ADDR);
@@ -3379,6 +3384,11 @@ sctp_asconf_send_nat_state_update(struct
TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next);
break;
#endif
+ default:
+ SCTPDBG(SCTP_DEBUG_ASCONF1,
+ "sctp_asconf_send_nat_state_update: unknown address family\n");
+ SCTP_FREE(aa, SCTP_M_ASC_ADDR);
+ return;
}
/* Now we must hunt the addresses and add all global addresses */
if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_BOUNDALL) {
More information about the svn-src-stable
mailing list