diff --git a/src/config.c b/src/config.c index 53d122a..8fbe4df 100644 --- a/src/config.c +++ b/src/config.c @@ -150,7 +150,11 @@ int config_set(Config * config, char const * section, char const * variable, string_delete(newvalue); return 1; } - string_delete(oldvalue); + if(oldvalue != NULL) + { + string_delete(p); + string_delete(oldvalue); + } return 0; }