From e8276e93c7114cae44b6c05718ea715da4730875 Mon Sep 17 00:00:00 2001
From: Michael Tuexen <tuexen@fh-muenster.de>
Date: Fri, 12 Oct 2018 17:24:45 +0200
Subject: [PATCH] Plumb an SCTP related memory leak.

---
 gtests/net/packetdrill/packet.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gtests/net/packetdrill/packet.c b/gtests/net/packetdrill/packet.c
index 4fcc6b9c..5d33c14a 100644
--- a/gtests/net/packetdrill/packet.c
+++ b/gtests/net/packetdrill/packet.c
@@ -178,11 +178,12 @@ static struct packet *packet_copy_with_headroom(struct packet *old_packet,
 	packet->udplite	= offset_ptr(old_base, new_base, old_packet->udplite);
 	packet->icmpv4	= offset_ptr(old_base, new_base, old_packet->icmpv4);
 	packet->icmpv6	= offset_ptr(old_base, new_base, old_packet->icmpv6);
-        
-        if (old_packet->chunk_list == NULL) {
+
+	if (old_packet->chunk_list == NULL) {
+		sctp_chunk_list_free(packet->chunk_list);
 		packet->chunk_list = NULL;
 		return packet;
-        }
+	}
 
 	/* Go through the SCTP specific lists */
 	for (old_chunk_item = old_packet->chunk_list->first;
-- 
GitLab