mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2025-12-10 07:44:41 +01:00
Ticket refs #15866: memory leak in icwmp/config.c
This commit is contained in:
parent
e7fa7df3a4
commit
12d58fcfa7
1 changed files with 3 additions and 3 deletions
6
config.c
6
config.c
|
|
@ -213,9 +213,6 @@ static int uci_action_value_common(char *cmd, uci_config_action action)
|
|||
struct uci_ptr ptr;
|
||||
char state_path[32];
|
||||
|
||||
s = strdup(cmd);
|
||||
t = s;
|
||||
|
||||
if (!c)
|
||||
{
|
||||
CWMP_LOG(ERROR, "Out of memory");
|
||||
|
|
@ -229,6 +226,9 @@ static int uci_action_value_common(char *cmd, uci_config_action action)
|
|||
uci_set_savedir(c, state_path);
|
||||
}
|
||||
|
||||
s = strdup(cmd);
|
||||
t = s;
|
||||
|
||||
if (uci_lookup_ptr(c, &ptr, s, true) != UCI_OK)
|
||||
{
|
||||
free(t);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue