diff options
author | dimitri staessens <[email protected]> | 2016-08-04 12:53:28 +0200 |
---|---|---|
committer | dimitri staessens <[email protected]> | 2016-08-04 17:17:49 +0200 |
commit | 139001b60b32e756e947d6e3a55767be9063029d (patch) | |
tree | 45a23543682a69151622cda6100eb1656c64c773 /src/ipcpd/local | |
parent | c9cffcf863b23e75ccb6d7800ac0d48fd1612259 (diff) | |
download | ouroboros-139001b60b32e756e947d6e3a55767be9063029d.tar.gz ouroboros-139001b60b32e756e947d6e3a55767be9063029d.zip |
ipcpd: Fix memory leaks
ipcp-data was not correctly destroyed.
Diffstat (limited to 'src/ipcpd/local')
-rw-r--r-- | src/ipcpd/local/main.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/ipcpd/local/main.c b/src/ipcpd/local/main.c index 4b9dcbbc..e77a0403 100644 --- a/src/ipcpd/local/main.c +++ b/src/ipcpd/local/main.c @@ -292,10 +292,6 @@ static int ipcp_local_name_reg(char * name) return -1; /* -ENOTENROLLED */ } - pthread_rwlock_unlock(&_ipcp->state_lock); - - pthread_rwlock_rdlock(&_ipcp->state_lock); - if (ipcp_data_add_reg_entry(_ipcp->data, name)) { pthread_rwlock_unlock(&_ipcp->state_lock); LOG_DBGF("Failed to add %s to local registry.", name); @@ -627,7 +623,8 @@ int main(int argc, char * argv[]) shim_ap_fini(); - free(_ipcp->data); + ipcp_data_destroy(_ipcp->data); + free(_ipcp->ops); free(_ipcp); |