From 702d024ce6f72507f12fadfe0f0a1bc2c585c0b9 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Sun, 22 May 2016 20:01:08 +0200 Subject: irmd: Change read lock to write lock A read lock was taken instead of a write lock, which resulted in double frees. --- src/irmd/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/irmd/main.c b/src/irmd/main.c index 4ee6399d..a33fae84 100644 --- a/src/irmd/main.c +++ b/src/irmd/main.c @@ -1208,7 +1208,7 @@ static int flow_dealloc_ipcp(int port_id) struct port_map_entry * e = NULL; rw_lock_rdlock(&instance->state_lock); - rw_lock_rdlock(&instance->flows_lock); + rw_lock_wrlock(&instance->flows_lock); e = get_port_map_entry(port_id); if (e == NULL) { -- cgit v1.2.3