]> uap-core.de Git - uwplayer.git/commitdiff
store copy of string in the settings map
authorOlaf Wintermann <olaf.wintermann@gmail.com>
Fri, 15 Apr 2022 19:29:01 +0000 (21:29 +0200)
committerOlaf Wintermann <olaf.wintermann@gmail.com>
Fri, 15 Apr 2022 19:29:01 +0000 (21:29 +0200)
application/settings.c

index aa1b9764fa11e6a0f2db5306646fbc6b9c99f430..ab2fb984e0ce3277d5dc1f1ca78344576dd8a5dc 100644 (file)
@@ -181,7 +181,7 @@ static void conf_load_global_settings(void) {
     for(size_t i=0;i<s->size;i++) {
         JSONObjValue *gs = &s->values[i];
         if(gs->value->type == JSON_STRING) {
-            ucx_map_cstr_put(uwp_settings, gs->name, gs->value->value.string.string);
+            ucx_map_cstr_put(uwp_settings, gs->name, strdup(gs->value->value.string.string));
         }
     }
 }