[Skiboot] [PATCH 01/13] Fix mem leak in core/test/run-time-utils
Stewart Smith
stewart at linux.vnet.ibm.com
Wed Aug 23 17:21:11 AEST 2017
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 at linux.vnet.ibm.com>
---
core/test/run-time-utils.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/core/test/run-time-utils.c b/core/test/run-time-utils.c
index 905390a788db..21c9978bdaa7 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;
}
--
2.13.5
More information about the Skiboot
mailing list