]> granicus.if.org Git - clang/commitdiff
Fix a memory leak in one of the test unit. Silent coverity warning CID 1095912
authorSylvestre Ledru <sylvestre@debian.org>
Mon, 18 Aug 2014 15:18:56 +0000 (15:18 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Mon, 18 Aug 2014 15:18:56 +0000 (15:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215898 91177308-0d34-0410-b5e6-96231b3b80d8

tools/c-index-test/c-index-test.c

index 08cf69b6f605a8bf00d9920ece0c7d052c99b455..d7c28ddb1e93b405a384a8e14f5921f2a2d854d0 100644 (file)
@@ -1643,6 +1643,7 @@ static int perform_file_scan(const char *ast_file, const char *source_file,
 
   if ((fp = fopen(source_file, "r")) == NULL) {
     fprintf(stderr, "Could not open '%s'\n", source_file);
+    clang_disposeTranslationUnit(TU);
     return 1;
   }