diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-08-23 10:58:55 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-08-23 10:58:55 +1000 |
commit | 696893d8a2a32dbec962e691445aaebcc4a6f203 (patch) | |
tree | be4c8390dc4b6960c802f45d6179e68c52aecbd0 /core/test | |
parent | 70de75d14498a89f34c4159c7d7d9fa497c603e6 (diff) | |
download | talos-skiboot-696893d8a2a32dbec962e691445aaebcc4a6f203.tar.gz talos-skiboot-696893d8a2a32dbec962e691445aaebcc4a6f203.zip |
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 <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/test')
-rw-r--r-- | core/test/run-time-utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/test/run-time-utils.c b/core/test/run-time-utils.c index 905390a7..21c9978b 100644 --- a/core/test/run-time-utils.c +++ b/core/test/run-time-utils.c @@ -55,6 +55,9 @@ int main(void) assert(t->tm_min == 42); assert(t->tm_sec == 24); + free(t); + free(ymd); + free(hms); return 0; } |