[llvm-commits] [compiler-rt] r158514 - /compiler-rt/trunk/lib/profile/GCDAProfiling.c

Bill Wendling isanbard at gmail.com
Fri Jun 15 02:12:04 PDT 2012


Author: void
Date: Fri Jun 15 04:12:04 2012
New Revision: 158514

URL: http://llvm.org/viewvc/llvm-project?rev=158514&view=rev
Log:
Free the allocated filename. Found by clang static analyzer.

Modified:
    compiler-rt/trunk/lib/profile/GCDAProfiling.c

Modified: compiler-rt/trunk/lib/profile/GCDAProfiling.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/GCDAProfiling.c?rev=158514&r1=158513&r2=158514&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/GCDAProfiling.c (original)
+++ compiler-rt/trunk/lib/profile/GCDAProfiling.c Fri Jun 15 04:12:04 2012
@@ -136,6 +136,7 @@
     output_file = fopen(filename, "w+b");
     if (!output_file) {
       fprintf(stderr, "profiling:%s: cannot open\n", filename);
+      free(filename);
       return;
     }
   }





More information about the llvm-commits mailing list