summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2015-07-16 14:52:28 +0000
committerHans Wennborg <hans@hanshq.net>2015-07-16 14:52:28 +0000
commit35888f0ee8ec040a77d8d1e8cb82d812281dee7f (patch)
tree6c367af4e82c70a8ef8e84731f6fa78e669e6ef1
parent369643424e43bdc7b547420cf7f16a6bd8a51b70 (diff)
downloadcompiler-rt-35888f0ee8ec040a77d8d1e8cb82d812281dee7f.tar.gz
Merging r242350:
------------------------------------------------------------------------ r242350 | samsonov | 2015-07-15 15:50:39 -0700 (Wed, 15 Jul 2015) | 1 line [probile] Fix memory leak introduced in r241824. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_37@242405 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/profile/InstrProfilingFile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/profile/InstrProfilingFile.c b/lib/profile/InstrProfilingFile.c
index 940223829..68e8c7b07 100644
--- a/lib/profile/InstrProfilingFile.c
+++ b/lib/profile/InstrProfilingFile.c
@@ -90,6 +90,7 @@ static void truncateCurrentFile(void) {
char *Copy = malloc(strlen(Filename) + 1);
strcpy(Copy, Filename);
__llvm_profile_recursive_mkdir(Copy);
+ free(Copy);
}
/* Truncate the file. Later we'll reopen and append. */