r215898 - Fix a memory leak in one of the test unit. Silent coverity warning CID 1095912

Sylvestre Ledru sylvestre at debian.org
Mon Aug 18 08:18:56 PDT 2014


Author: sylvestre
Date: Mon Aug 18 10:18:56 2014
New Revision: 215898

URL: http://llvm.org/viewvc/llvm-project?rev=215898&view=rev
Log:
Fix a memory leak in one of the test unit. Silent coverity warning CID 1095912

Modified:
    cfe/trunk/tools/c-index-test/c-index-test.c

Modified: cfe/trunk/tools/c-index-test/c-index-test.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/c-index-test/c-index-test.c?rev=215898&r1=215897&r2=215898&view=diff
==============================================================================
--- cfe/trunk/tools/c-index-test/c-index-test.c (original)
+++ cfe/trunk/tools/c-index-test/c-index-test.c Mon Aug 18 10:18:56 2014
@@ -1643,6 +1643,7 @@ static int perform_file_scan(const char
 
   if ((fp = fopen(source_file, "r")) == NULL) {
     fprintf(stderr, "Could not open '%s'\n", source_file);
+    clang_disposeTranslationUnit(TU);
     return 1;
   }
 





More information about the cfe-commits mailing list