diff options
author | Sander Vrijders <[email protected]> | 2016-08-25 10:58:36 +0200 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2016-08-25 10:58:36 +0200 |
commit | efe987478954d84e970e8b872bddb224d35b211b (patch) | |
tree | 6b15a66b18a721ae9b9b9f1791bd5bd9dfda0e74 | |
parent | 8f9aa6f02772d6f46b55741cdd76607a4e22c6a1 (diff) | |
parent | ca87c116be0676b20a1c1ad69635d1aa652887ac (diff) | |
download | ouroboros-efe987478954d84e970e8b872bddb224d35b211b.tar.gz ouroboros-efe987478954d84e970e8b872bddb224d35b211b.zip |
Merged in dstaesse/ouroboros/be-bugfixing (pull request #224)
tools: Fix memleak in irm_ipcp_enroll
-rw-r--r-- | src/tools/irm/irm_ipcp_enroll.c | 7 |
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); |