Ticket refs #15866: memory leak in icwmp/config.c

This commit is contained in:
Omar Kallel 2018-09-17 14:58:41 +01:00
parent e7fa7df3a4
commit 12d58fcfa7

View file

@ -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);