Skip to content

Commit 696893d

Browse files
committed
Fix mem leak in core/test/run-time-utils
Fixes the following LeakSanitizer errors: ================================================================= ==32426==ERROR: LeakSanitizer: detected memory leaks Direct leak of 56 byte(s) in 1 object(s) allocated from: #0 0x7fd94a1fa850 in malloc (/lib64/libasan.so.4+0xde850) #1 0x4014d4 in main core/test/run-time-utils.c:30 #2 0x7fd94904c509 in __libc_start_main (/lib64/libc.so.6+0x20509) Direct leak of 8 byte(s) in 1 object(s) allocated from: #0 0x7fd94a1fa850 in malloc (/lib64/libasan.so.4+0xde850) #1 0x4014f0 in main core/test/run-time-utils.c:32 #2 0x7fd94904c509 in __libc_start_main (/lib64/libc.so.6+0x20509) Direct leak of 4 byte(s) in 1 object(s) allocated from: #0 0x7fd94a1fa850 in malloc (/lib64/libasan.so.4+0xde850) #1 0x4014e2 in main core/test/run-time-utils.c:31 #2 0x7fd94904c509 in __libc_start_main (/lib64/libc.so.6+0x20509) Signed-off-by: Stewart Smith <[email protected]>
1 parent 70de75d commit 696893d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/test/run-time-utils.c

+3
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ int main(void)
5555
assert(t->tm_min == 42);
5656
assert(t->tm_sec == 24);
5757

58+
free(t);
59+
free(ymd);
60+
free(hms);
5861
return 0;
5962
}
6063

0 commit comments

Comments
 (0)