]> granicus.if.org Git - clang/commitdiff
[libclang] Fix leak in clang_indexSourceFile_Impl
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 29 Nov 2011 08:14:50 +0000 (08:14 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 29 Nov 2011 08:14:50 +0000 (08:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145393 91177308-0d34-0410-b5e6-96231b3b80d8

tools/libclang/Indexing.cpp

index 222e301d46e951288a583c6141176ccf4fc1b1de..5950455104ea9bb2e32a883b05c94781dc01ce6d 100644 (file)
@@ -252,7 +252,8 @@ static void clang_indexSourceFile_Impl(void *UserData) {
     Diags(CompilerInstance::createDiagnostics(DiagOpts, num_command_line_args, 
                                                 command_line_args,
                                                 CaptureDiag,
-                                                /*ShouldOwnClient=*/true));
+                                                /*ShouldOwnClient=*/true,
+                                                /*ShouldCloneClient=*/false));
 
   // Recover resources if we crash before exiting this function.
   llvm::CrashRecoveryContextCleanupRegistrar<DiagnosticsEngine,