summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2016-01-16 14:52:29 +0000
committertuexen <tuexen@FreeBSD.org>2016-01-16 14:52:29 +0000
commitfe5ee5dcb35eb7942826eed67cbd666554ff7023 (patch)
tree7814714e881055b58dbdf9dc81a0ae940e2beff6 /sys/netinet
parent6ec65b594f8f16e3dee43cc8c31bf6e5d7c15506 (diff)
downloadFreeBSD-src-fe5ee5dcb35eb7942826eed67cbd666554ff7023.zip
FreeBSD-src-fe5ee5dcb35eb7942826eed67cbd666554ff7023.tar.gz
MFC r287457:
Don't leak memory in an error case.
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/sctp_output.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index 412e609..6d7e593 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -11251,6 +11251,11 @@ sctp_send_hb(struct sctp_tcb *stcb, struct sctp_nets *net, int so_locked
break;
#endif
default:
+ if (chk->data) {
+ sctp_m_freem(chk->data);
+ chk->data = NULL;
+ }
+ sctp_free_a_chunk(stcb, chk, so_locked);
return;
break;
}
OpenPOWER on IntegriCloud