From 9f4044907a7c48cdce390e921058df1c5f833868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Thu, 25 Jul 2024 21:03:22 +0200 Subject: [PATCH] Silence use-after-free warning. This fixes the issue described in #100. --- lib/xmalloc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/xmalloc.c b/lib/xmalloc.c index a606d35..fa4cdaf 100644 --- a/lib/xmalloc.c +++ b/lib/xmalloc.c @@ -125,6 +125,9 @@ hash_table_add(hashTable *tbl, void *ptr, size_t bytes, } static void +#if defined(__GNUC__) && __GNUC__ >= 10 +__attribute__((access(none, 2))) +#endif hash_table_del(hashTable *tbl, void *ptr) { int i;