summaryrefslogtreecommitdiffstats
path: root/clang/tools/c-index-test/c-index-test.c
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre@debian.org>2014-08-18 15:18:56 +0000
committerSylvestre Ledru <sylvestre@debian.org>2014-08-18 15:18:56 +0000
commitb2482560895176676579aeb3bec0f8ee930440f4 (patch)
treef2f4f7fa13ac0b0e679a1c3a25d8f3827fa9ae50 /clang/tools/c-index-test/c-index-test.c
parent75c2914114bea6bff5e952c6d86353434b74a0b5 (diff)
downloadbcm5719-llvm-b2482560895176676579aeb3bec0f8ee930440f4.tar.gz
bcm5719-llvm-b2482560895176676579aeb3bec0f8ee930440f4.zip
Fix a memory leak in one of the test unit. Silent coverity warning CID 1095912
llvm-svn: 215898
Diffstat (limited to 'clang/tools/c-index-test/c-index-test.c')
-rw-r--r--clang/tools/c-index-test/c-index-test.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c
index 08cf69b6f60..d7c28ddb1e9 100644
--- a/clang/tools/c-index-test/c-index-test.c
+++ b/clang/tools/c-index-test/c-index-test.c
@@ -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;
}
OpenPOWER on IntegriCloud