summaryrefslogtreecommitdiff
path: root/lib/profile/GCDAProfiling.c
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-06-15 09:12:04 +0000
committerBill Wendling <isanbard@gmail.com>2012-06-15 09:12:04 +0000
commit666772c9934fac81d457c74d3eeca381652d0873 (patch)
tree69410b1b22540834ae2a874468f952f7208b5b96 /lib/profile/GCDAProfiling.c
parentb84ee029ada36949c30c57c5f701191783990574 (diff)
Free the allocated filename. Found by clang static analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@158514 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile/GCDAProfiling.c')
-rw-r--r--lib/profile/GCDAProfiling.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/profile/GCDAProfiling.c b/lib/profile/GCDAProfiling.c
index 300985ff4..8f92a9154 100644
--- a/lib/profile/GCDAProfiling.c
+++ b/lib/profile/GCDAProfiling.c
@@ -136,6 +136,7 @@ void llvm_gcda_start_file(const char *orig_filename) {
output_file = fopen(filename, "w+b");
if (!output_file) {
fprintf(stderr, "profiling:%s: cannot open\n", filename);
+ free(filename);
return;
}
}