diff options
author | Sander Vrijders <sander.vrijders@ugent.be> | 2017-08-23 22:30:46 +0000 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@ugent.be> | 2017-08-23 22:30:46 +0000 |
commit | 10c2f8ca9af659c5b7a56fdc8e8f84e931d3f6d4 (patch) | |
tree | 8a307b5138b18dba0ed277d4deb85a8ca8e64347 /src/ipcpd | |
parent | 1ca26ab86712575a5e89dcd68295b57fd27c5703 (diff) | |
parent | 47bd452352389925188ca4d36ae1c1ba611e6aeb (diff) | |
download | ouroboros-10c2f8ca9af659c5b7a56fdc8e8f84e931d3f6d4.tar.gz ouroboros-10c2f8ca9af659c5b7a56fdc8e8f84e931d3f6d4.zip |
Merged in sandervrijders/ouroboros/be-memleaks (pull request #568)
lib, ipcpd, irmd: Fix several memleaks
Diffstat (limited to 'src/ipcpd')
-rw-r--r-- | src/ipcpd/ipcp.c | 4 | ||||
-rw-r--r-- | src/ipcpd/normal/dht.c | 2 | ||||
-rw-r--r-- | src/ipcpd/normal/dt.c | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c index 300c22f4..ff45407b 100644 --- a/src/ipcpd/ipcp.c +++ b/src/ipcpd/ipcp.c @@ -184,10 +184,8 @@ static void * mainloop(void * o) if (sfd == -1) { pthread_mutex_unlock(&ipcpi.cmd_lock); - if (tpm_check()) { - close(sfd); + if (tpm_check()) break; - } continue; } diff --git a/src/ipcpd/normal/dht.c b/src/ipcpd/normal/dht.c index 65e26406..b5d52d93 100644 --- a/src/ipcpd/normal/dht.c +++ b/src/ipcpd/normal/dht.c @@ -2340,7 +2340,7 @@ void dht_destroy(struct dht * dht) list_for_each_safe(p, h, &dht->requests) { struct kad_req * r = list_entry(p, struct kad_req, next); list_del(&r->next); - free(r); + kad_req_destroy(r); } list_for_each_safe(p, h, &dht->refs) { diff --git a/src/ipcpd/normal/dt.c b/src/ipcpd/normal/dt.c index 173266f4..f4ab2440 100644 --- a/src/ipcpd/normal/dt.c +++ b/src/ipcpd/normal/dt.c @@ -252,6 +252,10 @@ void dt_fini(void) { int i; + bmp_destroy(dt.res_fds); + + pthread_rwlock_destroy(&dt.lock); + for (i = 0; i < QOS_CUBE_MAX; ++i) routing_i_destroy(dt.routing[i]); |