summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@ugent.be>2017-03-14 19:34:18 +0100
committerdimitri staessens <dimitri.staessens@ugent.be>2017-03-14 19:42:38 +0100
commitf18293b1458ebfb6105812868c15ba9be5661ba2 (patch)
treef8b6a88b9c7c8366946af500b80e4269f548d665 /src/ipcpd/normal
parent366fcbec4fb7de21c553f24efb977b45bf27f2e6 (diff)
downloadouroboros-f18293b1458ebfb6105812868c15ba9be5661ba2.tar.gz
ouroboros-f18293b1458ebfb6105812868c15ba9be5661ba2.zip
lib: Fix CDAP with multiple fds
Diffstat (limited to 'src/ipcpd/normal')
-rw-r--r--src/ipcpd/normal/enroll.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/ipcpd/normal/enroll.c b/src/ipcpd/normal/enroll.c
index 4e510038..bdf55fe8 100644
--- a/src/ipcpd/normal/enroll.c
+++ b/src/ipcpd/normal/enroll.c
@@ -106,8 +106,6 @@ static void * enroll_handle(void * o)
if (oc != CDAP_READ) {
log_warn("Invalid request.");
cdap_reply_send(cdap, key, -1, NULL, 0);
- cdap_destroy(cdap);
- flow_dealloc(conn.flow_info.fd);
free(name);
continue;
}
@@ -126,14 +124,10 @@ static void * enroll_handle(void * o)
buf[1] = hton64(t.tv_nsec);
cdap_reply_send(cdap, key, 0, buf, sizeof(buf));
free(name);
- cdap_destroy(cdap);
- flow_dealloc(conn.flow_info.fd);
continue;
} else {
log_warn("Illegal read: %s.", name);
cdap_reply_send(cdap, key, -1, NULL, 0);
- cdap_destroy(cdap);
- flow_dealloc(conn.flow_info.fd);
free(name);
continue;
}
@@ -142,8 +136,6 @@ static void * enroll_handle(void * o)
if (len < 0) {
log_err("Failed to pack %s.", name);
cdap_reply_send(cdap, key, -1, NULL, 0);
- cdap_destroy(cdap);
- flow_dealloc(conn.flow_info.fd);
free(name);
continue;
}
@@ -154,8 +146,7 @@ static void * enroll_handle(void * o)
if (cdap_reply_send(cdap, key, 0, buf, len)) {
log_err("Failed to send CDAP reply.");
- cdap_destroy(cdap);
- flow_dealloc(conn.flow_info.fd);
+ free(buf);
continue;
}