Merge pull request #1634 from cesanta/webui-plain

Fix former config value not being freed
This commit is contained in:
Sergey Lyubka authored and GitHub committed 2022-07-18 21:24:07 +01:00
commit d1828ecdb4
1 file changed
+1
+1
View File
@@ -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);
}
}