mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-18 10:59:45 +00:00
Fix former config value not being freed
This commit is contained in:
1 parent
89afe62121
commit
1651d9d6d9
1 file changed
+1
@@ -22,6 +22,7 @@ static struct config { char *url, *pub, *sub; } s_config;
|
||||
static void update_config(struct mg_str json, const char *path, char **value) {
|
||||
char *jval;
|
||||
if ((jval = mg_json_get_str(json, path)) != NULL) {
|
||||
free(*value);
|
||||
*value = strdup(jval);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user