defer free of thread-local dlerror buffers from inconsistent context