diff options
Diffstat (limited to 'src')
-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); |