svn commit: r294154 - stable/10/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Sat Jan 16 14:52:30 UTC 2016


Author: tuexen
Date: Sat Jan 16 14:52:29 2016
New Revision: 294154
URL: https://svnweb.freebsd.org/changeset/base/294154

Log:
  MFC r287457:
  Don't leak memory in an error case.

Modified:
  stable/10/sys/netinet/sctp_output.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/sctp_output.c
==============================================================================
--- stable/10/sys/netinet/sctp_output.c	Sat Jan 16 14:50:43 2016	(r294153)
+++ stable/10/sys/netinet/sctp_output.c	Sat Jan 16 14:52:29 2016	(r294154)
@@ -11251,6 +11251,11 @@ sctp_send_hb(struct sctp_tcb *stcb, stru
 		break;
 #endif
 	default:
+		if (chk->data) {
+			sctp_m_freem(chk->data);
+			chk->data = NULL;
+		}
+		sctp_free_a_chunk(stcb, chk, so_locked);
 		return;
 		break;
 	}


More information about the svn-src-all mailing list