diff options
-rw-r--r-- | compiler-rt/lib/profile/InstrProfilingWriter.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler-rt/lib/profile/InstrProfilingWriter.c b/compiler-rt/lib/profile/InstrProfilingWriter.c index db944e20f61..808ed62a156 100644 --- a/compiler-rt/lib/profile/InstrProfilingWriter.c +++ b/compiler-rt/lib/profile/InstrProfilingWriter.c @@ -59,8 +59,11 @@ lprofCreateBufferIO(WriterCallback FileWriter, void *File) { } COMPILER_RT_VISIBILITY void lprofDeleteBufferIO(ProfBufferIO *BufferIO) { - if (DynamicBufferIOBuffer) + if (DynamicBufferIOBuffer) { + DynamicBufferIOBuffer = 0; + VPBufferSize = 0; FreeHook(DynamicBufferIOBuffer); + } } COMPILER_RT_VISIBILITY int |