u/config: Use cJSON_Delete instead of cJSON_Free for gui scene parsing

This commit is contained in:
Moses Turner 2022-09-19 17:59:36 -05:00 committed by Jakob Bornecrantz
parent 714925e1b8
commit d91975299d

View file

@ -533,7 +533,7 @@ u_gui_state_get_scene(struct u_config_json *json, enum u_gui_state_scene scene)
struct cJSON *c =
cJSON_DetachItemFromObjectCaseSensitive(cJSON_GetObjectItemCaseSensitive(json->root, "scenes"), scene_name);
cJSON_free(json->root);
cJSON_Delete(json->root);
return c;
}