summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2016-08-25 10:58:36 +0200
committerSander Vrijders <[email protected]>2016-08-25 10:58:36 +0200
commitefe987478954d84e970e8b872bddb224d35b211b (patch)
tree6b15a66b18a721ae9b9b9f1791bd5bd9dfda0e74 /src
parent8f9aa6f02772d6f46b55741cdd76607a4e22c6a1 (diff)
parentca87c116be0676b20a1c1ad69635d1aa652887ac (diff)
downloadouroboros-efe987478954d84e970e8b872bddb224d35b211b.tar.gz
ouroboros-efe987478954d84e970e8b872bddb224d35b211b.zip
Merged in dstaesse/ouroboros/be-bugfixing (pull request #224)
tools: Fix memleak in irm_ipcp_enroll
Diffstat (limited to 'src')
-rw-r--r--src/tools/irm/irm_ipcp_enroll.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tools/irm/irm_ipcp_enroll.c b/src/tools/irm/irm_ipcp_enroll.c
index 3755f199..32d8be54 100644
--- a/src/tools/irm/irm_ipcp_enroll.c
+++ b/src/tools/irm/irm_ipcp_enroll.c
@@ -70,9 +70,12 @@ int do_enroll_ipcp(int argc, char ** argv)
len = irm_list_ipcps(name, &apis);
}
- for (i = 0; i < len; i++)
- if (irm_enroll_ipcp(apis[i], dif_name))
+ for (i = 0; i < len; i++) {
+ if (irm_enroll_ipcp(apis[i], dif_name)) {
+ free(apis);
return -1;
+ }
+ }
if (apis != NULL)
free(apis);