Commit d6eca240 by Stéphane Graber

conffile.c: Also clear text entries with no value

parent 53251299
......@@ -216,8 +216,12 @@ static int config_string_item(char **conf_item, const char *value)
{
char *new_value;
if (!value || strlen(value) == 0)
if (!value || strlen(value) == 0) {
if (*conf_item)
free(*conf_item);
*conf_item = NULL;
return 0;
}
new_value = strdup(value);
if (!new_value) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment