From 6207cb519bbe9ce31eaef9a835fe6bd57dbf0d0f Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 15 Jun 2012 09:11:47 +0000 Subject: [PATCH] Free the allocated filename. Found by clang static analyzer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158513 91177308-0d34-0410-b5e6-96231b3b80d8 --- runtime/libprofile/GCDAProfiling.c | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/libprofile/GCDAProfiling.c b/runtime/libprofile/GCDAProfiling.c index b01b948142a..f2dc4f79881 100644 --- a/runtime/libprofile/GCDAProfiling.c +++ b/runtime/libprofile/GCDAProfiling.c @@ -117,6 +117,7 @@ void llvm_gcda_start_file(const char *orig_filename) { fprintf(stderr, "LLVM profiling runtime: cannot open '%s': ", cptr ? cptr + 1 : orig_filename); perror(""); + free(filename); return; } }