mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-02 20:08:21 +08:00
init_conf_str_vars in master_params.cpp has memory leak when master reload configure.
This commit is contained in:
parent
1a36ede275
commit
3d406e7277
@ -2,6 +2,8 @@
|
||||
6) 2017.9.5
|
||||
6.1) feature: master can wait children to exit with sync or async
|
||||
6.2) feature: master can kill SIGTERM children when reloading
|
||||
6.3) bugfix: master_params.cpp 中的 init_conf_str_vars 函数在 master reload 时
|
||||
有内存泄露
|
||||
|
||||
5) 2017.8.11
|
||||
5.1) safety: master can't fatal for some configure error of any app service.
|
||||
|
@ -92,12 +92,13 @@ static void init_conf_int_vars(ACL_CONFIG_INT_TABLE cit[])
|
||||
static void init_conf_str_vars(ACL_CONFIG_STR_TABLE cst[])
|
||||
{
|
||||
int i;
|
||||
static int first_call = 1;
|
||||
|
||||
for (i = 0; cst[i].name != 0; i++) {
|
||||
/*
|
||||
if (*(cst[i].target) != 0)
|
||||
if (first_call)
|
||||
first_call = 0;
|
||||
else if (*(cst[i].target) != 0)
|
||||
acl_myfree(*(cst[i].target));
|
||||
*/
|
||||
*(cst[i].target) = acl_mystrdup(cst[i].defval);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user