aboutsummaryrefslogtreecommitdiffstats
path: root/main/strongswan/0017-kernel-netlink-unlock-mutex-in-del-policy.patch
blob: 63f120d2842919c5dad5ea323e523b3a58bc64b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From 1ce32c9cdcb1cfacd4c8389402a24c4ed7cf0109 Mon Sep 17 00:00:00 2001
From: Tobias Brunner <tobias@strongswan.org>
Date: Fri, 31 Jul 2015 11:20:24 +0200
Subject: [PATCH] kernel-netlink: Unlock mutex in del_policy() if mark can't be
 added to message

---
 src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c b/src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c
index a6cf977..e0f1dd7 100644
--- a/src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c
+++ b/src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c
@@ -2562,6 +2562,7 @@ METHOD(kernel_ipsec_t, del_policy, status_t,
 
 	if (!add_mark(hdr, sizeof(request), mark))
 	{
+		this->mutex->unlock(this->mutex);
 		return FAILED;
 	}