Skip to content

Commit

Permalink
Fix deallocation error in test.cpp
Browse files Browse the repository at this point in the history
If a test command fails to execute, `expectedrom` and `truerom` will be
freed twice, which causes failure on Windows debug. The pointers are set
to null after freeing to reslolve this.
  • Loading branch information
bonimy committed Sep 24, 2022
1 parent b2f23ab commit 04d5627
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/asar-tests/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@
{ \
numfailed++; \
free(expectedrom); \
expectedrom = NULL; \
free(truerom); \
truerom = NULL; \
printf("Failure!\n\n"); \
continue; \
}
Expand Down

0 comments on commit 04d5627

Please sign in to comment.