diff options
author | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-08-22 16:48:22 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-08-22 16:48:22 +0200 |
commit | f4c38f42f83c4a7df15b2351cb372f7638ae29ed (patch) | |
tree | c97511258dca33022059718fc1ea666808222e42 /src/tools/irm/irm_ipcp_enroll.c | |
parent | ac01105baf8ceb2c8c8a3711531840498c8a6fa9 (diff) | |
parent | 34123b6bfc39e5bea5f2c599b1eea51d3c82ba06 (diff) | |
download | ouroboros-f4c38f42f83c4a7df15b2351cb372f7638ae29ed.tar.gz ouroboros-f4c38f42f83c4a7df15b2351cb372f7638ae29ed.zip |
Merged in dstaesse/ouroboros/be-fix-tools (pull request #217)
tools: Fix segmentation faults
Diffstat (limited to 'src/tools/irm/irm_ipcp_enroll.c')
-rw-r--r-- | src/tools/irm/irm_ipcp_enroll.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tools/irm/irm_ipcp_enroll.c b/src/tools/irm/irm_ipcp_enroll.c index b7a12e2c..3755f199 100644 --- a/src/tools/irm/irm_ipcp_enroll.c +++ b/src/tools/irm/irm_ipcp_enroll.c @@ -39,7 +39,7 @@ int do_enroll_ipcp(int argc, char ** argv) { char * name = NULL; char * dif_name = NULL; - pid_t * apis; + pid_t * apis = NULL; ssize_t len = 0; int i = 0; @@ -74,7 +74,8 @@ int do_enroll_ipcp(int argc, char ** argv) if (irm_enroll_ipcp(apis[i], dif_name)) return -1; - free(apis); + if (apis != NULL) + free(apis); return 0; } |