Clean up this thing
This commit is contained in:
parent
7f3e63a18d
commit
be4e0aee1f
|
@ -769,14 +769,10 @@ void config_set_string(config_file_t *conf, const char *key, const char *val)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
entry = (struct config_entry_list*)calloc(1, sizeof(*entry));
|
if (!val) return;
|
||||||
|
|
||||||
if (!entry || !val)
|
entry = (struct config_entry_list*)calloc(1, sizeof(*entry));
|
||||||
{
|
if (!entry) return;
|
||||||
if (entry)
|
|
||||||
free(entry);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
entry->key = strdup(key);
|
entry->key = strdup(key);
|
||||||
entry->value = strdup(val);
|
entry->value = strdup(val);
|
||||||
|
|
Loading…
Reference in New Issue