From: Frantisek Sumsal Date: Tue, 18 Jun 2019 09:25:16 +0000 (+0200) Subject: hashmap: avoid using TLS in a destructor X-Git-Tag: v243-rc1~271 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fsystemd.git;a=commitdiff_plain;h=31c9d74d500b6fad86f1ec26ab5bba156051e813;hp=31c9d74d500b6fad86f1ec26ab5bba156051e813 hashmap: avoid using TLS in a destructor Using C11 thread-local storage in destructors causes uninitialized read. Let's avoid that using a direct comparison instead of using the cached values. As this code path is taken only when compiled with -DVALGRIND=1, the performance cost shouldn't matter too much. Fixes #12814 ---