Notes
This function is in beta test. Please help improve it in the issues
here.
$ ./ex3_memory_check rand_char*.txt rand ================================================================= ==1697==ERROR: LeakSanitizer: detected memory leaks Direct leak of 49909 byte(s) in 10000 object(s) allocated from: #0 0x55673644dc5e in malloc (/out/package/ex3_memory_check+0xc7c5e) (BuildId: 1b9a446a3ba76922453cd2e77774d9cf636fdd2a) #1 0x55673648ac3d in main (/out/package/ex3_memory_check+0x104c3d) (BuildId: 1b9a446a3ba76922453cd2e77774d9cf636fdd2a) #2 0x7f003eedbc86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86) (BuildId: f7307432a8b162377e77a182b6cc2e53d771ec4b) SUMMARY: AddressSanitizer: 49909 byte(s) leaked in 10000 allocation(s).
Hints
Your answer may be identical to the JOJ answer in the first several lines.
However, the main problem you meet now is Runtime Error. And the exit code of your program is 1, which should be 0.
Please double check your code to solve this problem and try again.
Your Answer
Program exit with non zero value 1!
JOJ Answer
Correct!