diff options
author | Dimitri Staessens <dimitri.staessens@intec.ugent.be> | 2016-03-03 17:15:03 +0100 |
---|---|---|
committer | Dimitri Staessens <dimitri.staessens@intec.ugent.be> | 2016-03-03 17:15:03 +0100 |
commit | 11c709cc077746621e3d9ff2411a748d400f1d4f (patch) | |
tree | bca214380c41311fe1d7e9d05f77f42c4e1b3161 /src/lib/irm.c | |
parent | 52a5113760802e16b07d9d954237871d52cff70a (diff) | |
parent | ef2a4f128fa0250db5457069e397bf328c6da25e (diff) | |
download | ouroboros-11c709cc077746621e3d9ff2411a748d400f1d4f.tar.gz ouroboros-11c709cc077746621e3d9ff2411a748d400f1d4f.zip |
Merged in sandervrijders/ouroboros/be-memleaks (pull request #19)
lib, irmd: Fix memleaks
Diffstat (limited to 'src/lib/irm.c')
-rw-r--r-- | src/lib/irm.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/irm.c b/src/lib/irm.c index 97000029..8756d7fc 100644 --- a/src/lib/irm.c +++ b/src/lib/irm.c @@ -26,6 +26,7 @@ #include <ouroboros/common.h> #include <ouroboros/logs.h> #include <ouroboros/sockets.h> +#include <stdlib.h> static int send_irm_msg(struct irm_msg * msg) { @@ -47,8 +48,11 @@ static int send_irm_msg(struct irm_msg * msg) return -1; } - close(sockfd); - return 0; + free(buf->data); + free(buf); + + close(sockfd); + return 0; } int irm_create_ipcp(rina_name_t name, |