[compiler-rt] r269724 - Avoid leak. Free before resetting.
Sean Silva via llvm-commits
llvm-commits at lists.llvm.org
Mon May 16 16:28:36 PDT 2016
Author: silvas
Date: Mon May 16 18:28:35 2016
New Revision: 269724
URL: http://llvm.org/viewvc/llvm-project?rev=269724&view=rev
Log:
Avoid leak. Free before resetting.
Modified:
compiler-rt/trunk/lib/profile/InstrProfilingWriter.c
Modified: compiler-rt/trunk/lib/profile/InstrProfilingWriter.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfilingWriter.c?rev=269724&r1=269723&r2=269724&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfilingWriter.c (original)
+++ compiler-rt/trunk/lib/profile/InstrProfilingWriter.c Mon May 16 18:28:35 2016
@@ -67,9 +67,9 @@ lprofCreateBufferIO(WriterCallback FileW
COMPILER_RT_VISIBILITY void lprofDeleteBufferIO(ProfBufferIO *BufferIO) {
if (DynamicBufferIOBuffer) {
+ FreeHook(DynamicBufferIOBuffer);
DynamicBufferIOBuffer = 0;
VPBufferSize = 0;
- FreeHook(DynamicBufferIOBuffer);
}
}
More information about the llvm-commits
mailing list