Skip to content

Commit

Permalink
Fix possible handle leak
Browse files Browse the repository at this point in the history
  • Loading branch information
peter15914 committed Jan 3, 2025
1 parent 722f673 commit 76f01d7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@ char* flecs_load_from_file(

return content;
error:
if (file) {
fclose(file);
}
ecs_os_free(content);
return NULL;
}
Expand Down

0 comments on commit 76f01d7

Please sign in to comment.