Memory leak in testParser
When running with the sanitizer on, we get a memory leak report in the testParser.sh case.
==2203==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 32 byte(s) in 1 object(s) allocated from:
#0 0x7f67d6c13b50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50)
#1 0x55b34c6b4684 in parser_get_opt_param_string_array /home/matthieu/Desktop/Swift-git/master/swiftsim/src/parser.c:1103
#2 0x55b34c6a2a75 in main /home/matthieu/Desktop/Swift-git/master/swiftsim/tests/testParser.c:114
#3 0x7f67d407ab96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
Indirect leak of 24 byte(s) in 4 object(s) allocated from:
#0 0x7f67d6c13b50 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb50)
#1 0x55b34c6b46f6 in parser_get_opt_param_string_array /home/matthieu/Desktop/Swift-git/master/swiftsim/src/parser.c:1105
#2 0x55b34c6a2a75 in main /home/matthieu/Desktop/Swift-git/master/swiftsim/tests/testParser.c:114
#3 0x7f67d407ab96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
It seems that the function parser_free_param_string_array()
that ought to clean things up is never called.