Avoid leak. Free before resetting.

llvm-svn: 269724
This commit is contained in:
Sean Silva 2016-05-16 23:28:35 +00:00
parent 7bb62ef1e9
commit cfec6c6a28
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
}