Do not try to free NULL pointers.
This commit is contained in:
parent
113458c286
commit
ee427cac0d
2 changed files with 2 additions and 2 deletions
|
@ -465,7 +465,7 @@ bool setup_myself(void) {
|
||||||
|
|
||||||
execute_script("tinc-up", envp);
|
execute_script("tinc-up", envp);
|
||||||
|
|
||||||
for(i = 0; i < 5; i++)
|
for(i = 0; i < 4; i++)
|
||||||
free(envp[i]);
|
free(envp[i]);
|
||||||
|
|
||||||
/* Run subnet-up scripts for our own subnets */
|
/* Run subnet-up scripts for our own subnets */
|
||||||
|
|
|
@ -512,7 +512,7 @@ void subnet_update(node_t *owner, subnet_t *subnet, bool up) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i = 0; envp[i] && i < 9; i++)
|
for(i = 0; envp[i] && i < 8; i++)
|
||||||
free(envp[i]);
|
free(envp[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue