https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71684
--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> --- As suggested in comment 5, we might want to make the use of __gthread_mutex_destroy platform-specific, i.e. have a new config macro that says we need the destroy even when we use INIT. That way the change can be limited to targets where it's needed to fix a leak. If your OS has no ABI compatibility requirements w.r.t GCC, you could just define _GTHREAD_USE_MUTEX_INIT_FUNC and be done with it.