aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tsan/rtl/tsan_mman.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tsan/rtl/tsan_mman.h')
-rw-r--r--lib/tsan/rtl/tsan_mman.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/tsan/rtl/tsan_mman.h b/lib/tsan/rtl/tsan_mman.h
index 467aabdf2b9d..a5280d4472c9 100644
--- a/lib/tsan/rtl/tsan_mman.h
+++ b/lib/tsan/rtl/tsan_mman.h
@@ -79,11 +79,10 @@ enum MBlockType {
void *internal_alloc(MBlockType typ, uptr sz);
void internal_free(void *p);
-template<typename T>
-void DestroyAndFree(T *&p) {
+template <typename T>
+void DestroyAndFree(T *p) {
p->~T();
internal_free(p);
- p = 0;
}
} // namespace __tsan