summaryrefslogtreecommitdiff
path: root/lib/profile/InstrProfilingWriter.c
diff options
context:
space:
mode:
authorSean Silva <chisophugis@gmail.com>2016-05-16 23:28:35 +0000
committerSean Silva <chisophugis@gmail.com>2016-05-16 23:28:35 +0000
commitdb00dbbe78b6af476122c33bb8322d4613ed4615 (patch)
tree780085b4b76ad6ce44ab0191cb4c63bbc8257505 /lib/profile/InstrProfilingWriter.c
parente3e27c07259bbfe1cc4615ad518f51d143cda0cc (diff)
Avoid leak. Free before resetting.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@269724 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile/InstrProfilingWriter.c')
-rw-r--r--lib/profile/InstrProfilingWriter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/profile/InstrProfilingWriter.c b/lib/profile/InstrProfilingWriter.c
index 3e90b1d49..95f37e8e9 100644
--- a/lib/profile/InstrProfilingWriter.c
+++ b/lib/profile/InstrProfilingWriter.c
@@ -67,9 +67,9 @@ lprofCreateBufferIO(WriterCallback FileWriter, void *File) {
COMPILER_RT_VISIBILITY void lprofDeleteBufferIO(ProfBufferIO *BufferIO) {
if (DynamicBufferIOBuffer) {
+ FreeHook(DynamicBufferIOBuffer);
DynamicBufferIOBuffer = 0;
VPBufferSize = 0;
- FreeHook(DynamicBufferIOBuffer);
}
}