diff --git a/src/world/worldLoader.c b/src/world/worldLoader.c index 016b552..f88e5de 100644 --- a/src/world/worldLoader.c +++ b/src/world/worldLoader.c @@ -63,6 +63,10 @@ void loadWorld(char *filename) loadEntities(cJSON_GetObjectItem(root, "entities")); loadObjectives(cJSON_GetObjectItem(root, "objectives")); + + cJSON_Delete(root); + + free(text); } static void loadEnemyTypes(char *enemyTypes)