diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-05-08 16:14:35 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-05-08 16:14:35 +0200 |
commit | 7d0fcf6392be6a738d0ba7450b62f8c48062279a (patch) | |
tree | 7d098bb422be8597dd2a30a60a08a44a89d5ebf6 /src/lib/dev.c | |
parent | eb9f44379d5316e7f7e9311d7a66d2041eca743a (diff) | |
download | ouroboros-7d0fcf6392be6a738d0ba7450b62f8c48062279a.tar.gz ouroboros-7d0fcf6392be6a738d0ba7450b62f8c48062279a.zip |
lib/irmd/ipcpd/tools: fixes comments on eb9f443
Diffstat (limited to 'src/lib/dev.c')
-rw-r--r-- | src/lib/dev.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/lib/dev.c b/src/lib/dev.c index 40bf2dc3..c99e8cdb 100644 --- a/src/lib/dev.c +++ b/src/lib/dev.c @@ -249,12 +249,26 @@ int flow_accept(int fd, return -1; } + *ap_name = strdup(recv_msg->ap_name); + if (*ap_name == NULL) { + bmp_release(_ap_instance->fds, cfd); + irm_msg__free_unpacked(recv_msg, NULL); + return -1; + } + + if (ae_name != NULL) { + *ae_name = strdup(recv_msg->ae_name); + if (*ae_name == NULL) { + bmp_release(_ap_instance->fds, cfd); + irm_msg__free_unpacked(recv_msg, NULL); + return -1; + } + } + _ap_instance->flows[cfd].port_id = recv_msg->port_id; _ap_instance->flows[cfd].oflags = FLOW_O_DEFAULT; - *ap_name = strdup(recv_msg->ap_name); - if (ae_name != NULL) - *ae_name = strdup(recv_msg->ae_name); + irm_msg__free_unpacked(recv_msg, NULL); |