Skip to content

Commit

Permalink
Stop leaking the input buffer.
Browse files Browse the repository at this point in the history
  • Loading branch information
vkoskiv committed Jan 22, 2020
1 parent 74bfbfe commit 0a527ec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ int main(int argc, char *argv[]) {
logr(info, "%zi bytes of input JSON loaded from %s, parsing.\n", bytes, argc == 2 ? "file" : "stdin");
if (!input) return -1;
if (crLoadSceneFromBuf(input)) {
free(input);
crDestroyRenderer();
return -1;
}
free(input);
crInitSDL();
crRenderSingleFrame();
crWriteImage();
Expand Down

0 comments on commit 0a527ec

Please sign in to comment.