Skip to content

Commit

Permalink
Ensure json is freed when a file is done being used.
Browse files Browse the repository at this point in the history
Looks like this was originally called in the wrong order, then
commented out. Reinstating this did not seem to cause any issues,
although I should probably check it out with valgrind later.
  • Loading branch information
Kestrel Gregorich-Trevor committed Jan 18, 2024
1 parent 0dffa1a commit e82c901
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ void json_to_monster_list(const char *fname) {
g.monsters[g.total_monsters] = new_actor;
g.total_monsters++;
}
//cJSON_Delete(all_json);
cJSON_Delete(actor_json);
cJSON_Delete(all_json);
}

void json_to_item_list(const char *fname) {
Expand Down

0 comments on commit e82c901

Please sign in to comment.