aboutsummaryrefslogtreecommitdiffstats
path: root/main/strongswan/0016-ike-Fix-memory-leak-if-remote-address-is-kept.patch
blob: 3b773d02aa5c8e000250b7c7a797b805cd4b9921 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From faebdeac8eafad7b5c2109d5a9ce0af41dbf315c Mon Sep 17 00:00:00 2001
From: Tobias Brunner <tobias@strongswan.org>
Date: Mon, 27 Jul 2015 19:37:41 +0200
Subject: [PATCH] ike: Fix memory leak if remote address is kept

---
 src/libcharon/sa/ike_sa.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/libcharon/sa/ike_sa.c b/src/libcharon/sa/ike_sa.c
index 752a756..6ffbd55 100644
--- a/src/libcharon/sa/ike_sa.c
+++ b/src/libcharon/sa/ike_sa.c
@@ -1230,6 +1230,10 @@ static void resolve_hosts(private_ike_sa_t *this)
 			 * address family might have changed */
 			set_other_host(this, host);
 		}
+		else
+		{
+			host->destroy(host);
+		}
 	}
 
 	if (this->local_host)
-- 
2.4.6