Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Sep 2015 09:24:08 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r287457 - head/sys/netinet
Message-ID:  <201509040924.t849O8RK060620@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Fri Sep  4 09:24:07 2015
New Revision: 287457
URL: https://svnweb.freebsd.org/changeset/base/287457

Log:
  Don't leak memory in an error case.
  
  MFC after:	1 week

Modified:
  head/sys/netinet/sctp_output.c

Modified: head/sys/netinet/sctp_output.c
==============================================================================
--- head/sys/netinet/sctp_output.c	Fri Sep  4 09:22:16 2015	(r287456)
+++ head/sys/netinet/sctp_output.c	Fri Sep  4 09:24:07 2015	(r287457)
@@ -11235,6 +11235,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;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509040924.t849O8RK060620>