Skip to content

Commit 04d5627

Browse files
committed
Fix deallocation error in test.cpp
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.
1 parent b2f23ab commit 04d5627

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/asar-tests/test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@
5555
{ \
5656
numfailed++; \
5757
free(expectedrom); \
58+
expectedrom = NULL; \
5859
free(truerom); \
60+
truerom = NULL; \
5961
printf("Failure!\n\n"); \
6062
continue; \
6163
}

0 commit comments

Comments
 (0)