Epplet_load_config(): Fix memory leak when called more than once
This commit is contained in:
parent
b09b798681
commit
9e2045a54b
10
api/epplet.c
10
api/epplet.c
|
@ -5609,10 +5609,12 @@ Epplet_load_config(void)
|
|||
if (epplet_instance == 0)
|
||||
return;
|
||||
|
||||
/* create config file name */
|
||||
snprintf(s, sizeof(s), "%s/%s.cfg", conf_dir, epplet_name);
|
||||
epplet_cfg_file = strdup(s);
|
||||
|
||||
if (!epplet_cfg_file)
|
||||
{
|
||||
/* create config file name */
|
||||
snprintf(s, sizeof(s), "%s/%s.cfg", conf_dir, epplet_name);
|
||||
epplet_cfg_file = strdup(s);
|
||||
}
|
||||
Epplet_load_config_file(epplet_cfg_file);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue