diff options
author | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-05-22 20:01:08 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-05-22 20:01:08 +0200 |
commit | 702d024ce6f72507f12fadfe0f0a1bc2c585c0b9 (patch) | |
tree | ac6afeeae347ffb8bec25cee4e1b804230c3ad89 /src/irmd/main.c | |
parent | 0200dcb157be0e62eb495bc870cdac03130c2aa1 (diff) | |
download | ouroboros-702d024ce6f72507f12fadfe0f0a1bc2c585c0b9.tar.gz ouroboros-702d024ce6f72507f12fadfe0f0a1bc2c585c0b9.zip |
irmd: Change read lock to write lock
A read lock was taken instead of a write lock, which resulted in
double frees.
Diffstat (limited to 'src/irmd/main.c')
-rw-r--r-- | src/irmd/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |