[compiler-rt] r177262 - tsan: fix memory leak

Dmitry Vyukov dvyukov at google.com
Mon Mar 18 02:09:41 PDT 2013


Author: dvyukov
Date: Mon Mar 18 04:09:41 2013
New Revision: 177262

URL: http://llvm.org/viewvc/llvm-project?rev=177262&view=rev
Log:
tsan: fix memory leak

Modified:
    compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc

Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc?rev=177262&r1=177261&r2=177262&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl_thread.cc Mon Mar 18 04:09:41 2013
@@ -71,6 +71,7 @@ void ThreadContext::OnReset(void *arg) {
   OnCreatedArgs *args = static_cast<OnCreatedArgs *>(arg);
   StatInc(args->thr, StatThreadReuse);
   sync.Reset();
+  DestroyAndFree(dead_info);
 }
 
 struct OnStartedArgs {





More information about the llvm-commits mailing list