summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/fa.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-07-30 10:11:35 +0000
committerSander Vrijders <sander.vrijders@ugent.be>2017-07-30 10:11:35 +0000
commit490ebfdb483c6f13aa45e5d80610f55ee95f9fae (patch)
treea30f99b02b460edeb2f3db094f89a431eddfa1f6 /src/ipcpd/normal/fa.c
parentbddac9e135e1a412d60de39cf17249507107499d (diff)
parent396cd99e3bc51bbc23387259da028d109349374c (diff)
downloadouroboros-490ebfdb483c6f13aa45e5d80610f55ee95f9fae.tar.gz
ouroboros-490ebfdb483c6f13aa45e5d80610f55ee95f9fae.zip
Merged in dstaesse/ouroboros/be-fixes (pull request #537)
Be fixes
Diffstat (limited to 'src/ipcpd/normal/fa.c')
-rw-r--r--src/ipcpd/normal/fa.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/ipcpd/normal/fa.c b/src/ipcpd/normal/fa.c
index 6e880067..d346f67c 100644
--- a/src/ipcpd/normal/fa.c
+++ b/src/ipcpd/normal/fa.c
@@ -98,9 +98,11 @@ static void fa_post_sdu(void * ae,
shm_du_buff_tail(sdb) -
shm_du_buff_head(sdb),
shm_du_buff_head(sdb));
+
+ ipcp_sdb_release(sdb);
+
if (msg == NULL) {
log_err("Failed to unpack flow alloc message.");
- ipcp_sdb_release(sdb);
return;
}
@@ -112,7 +114,6 @@ static void fa_post_sdu(void * ae,
log_err("Bad flow request.");
pthread_mutex_unlock(&ipcpi.alloc_lock);
flow_alloc_msg__free_unpacked(msg, NULL);
- ipcp_sdb_release(sdb);
return;
}
@@ -126,7 +127,6 @@ static void fa_post_sdu(void * ae,
log_dbg("Won't allocate over non-operational IPCP.");
pthread_mutex_unlock(&ipcpi.alloc_lock);
flow_alloc_msg__free_unpacked(msg, NULL);
- ipcp_sdb_release(sdb);
return;
}
@@ -140,7 +140,6 @@ static void fa_post_sdu(void * ae,
pthread_mutex_unlock(&ipcpi.alloc_lock);
flow_alloc_msg__free_unpacked(msg, NULL);
log_err("Failed to get fd for flow.");
- ipcp_sdb_release(sdb);
return;
}
@@ -173,12 +172,10 @@ static void fa_post_sdu(void * ae,
default:
log_err("Got an unknown flow allocation message.");
flow_alloc_msg__free_unpacked(msg, NULL);
- ipcp_sdb_release(sdb);
return;
}
flow_alloc_msg__free_unpacked(msg, NULL);
- ipcp_sdb_release(sdb);
}
int fa_init(void)