https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66339
lh_mouse <lh_mouse at 126 dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lh_mouse at 126 dot com --- Comment #2 from lh_mouse <lh_mouse at 126 dot com> --- (In reply to Andreas Schwab from comment #1) > This is not a leak. The memory is still reachable and there is no point in > freeing it if the program is exiting anyway. It is definitely a leak. 'Being reachable' has nothing to do with whether it is a leak or not. If you malloc() something but never free() it, it leaks essentially. Being reachable only means the leak detector (here, valgrind) is unable to tell whether it is a false leak that would eventually be freed after the detector itself terminates.