From: Ivan Maidanski Date: Fri, 25 Aug 2017 14:59:05 +0000 (+0300) Subject: Eliminate 'memory leak' code defect in remove_specific X-Git-Tag: v7.6.2~63 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=862cec2137526e96520755b93900b5211191962c;p=gc Eliminate 'memory leak' code defect in remove_specific * specific.c [LINT2] (GC_remove_specific): Call GC_noop1(entry) to indicate that entry is lost (the memory will be collected during GC). --- diff --git a/specific.c b/specific.c index 81174d0b..eca2d937 100644 --- a/specific.c +++ b/specific.c @@ -111,6 +111,9 @@ GC_INNER void GC_remove_specific_after_fork(tsd * key, pthread_t t) /* cache lookup, which should still be examining deallocated memory.*/ /* This can only happen if the concurrent access is from another */ /* thread, and hence has missed the cache, but still... */ +# ifdef LINT2 + GC_noop1((word)entry); +# endif /* With GC, we're done, since the pointers from the cache will */ /* be overwritten, all local pointers to the entries will be */