Hmm, works here
$ gcc -Wall -pedantic -Wno-long-long -g -std=c99 -fsanitize=address code.c
$ ./a.out ================================================================= ==14659==ERROR: LeakSanitizer: detected memory leaks Direct leak of 2500 byte(s) in 1 object(s) allocated from: #0 0x7f1a6ab5c3cf in __interceptor_malloc (/lib64/libasan.so.6+0xab3cf) #1 0x401205 in S_create /tmp/code.c:23 #2 0x4012fc in main /tmp/code.c:39 #3 0x7f1a6a90e1e1 in __libc_start_main ../csu/libc-start.c:314 SUMMARY: AddressSanitizer: 2500 byte(s) leaked in 1 allocation(s).
That was under Fedora 33 with gcc version 10.2.1 20201125 (Red Hat 10.2.1-9) (GCC) and libasan 10.2.1 (F33 package).
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hmm, works here
That was under Fedora 33 with gcc version 10.2.1 20201125 (Red Hat 10.2.1-9) (GCC) and libasan 10.2.1 (F33 package).