mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-16 10:39:49 +00:00
Merge pull request #1634 from cesanta/webui-plain
Fix former config value not being freed
This commit is contained in:
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