diff --git a/cpp/ycm/ClangCompleter/CompilationDatabase.cpp b/cpp/ycm/ClangCompleter/CompilationDatabase.cpp index 0e4c4a08..394b0631 100644 --- a/cpp/ycm/ClangCompleter/CompilationDatabase.cpp +++ b/cpp/ycm/ClangCompleter/CompilationDatabase.cpp @@ -106,6 +106,7 @@ std::string CompilationDatabase::CompileCommandWorkingDirectoryForFile( path_to_directory = CXStringToString( clang_CompileCommand_getDirectory( command ) ); + clang_CompileCommands_dispose( commands ); return path_to_directory; } diff --git a/python/completers/cpp/clang_completer.py b/python/completers/cpp/clang_completer.py index f4855284..9cf6e9dd 100644 --- a/python/completers/cpp/clang_completer.py +++ b/python/completers/cpp/clang_completer.py @@ -82,7 +82,7 @@ class ClangCompleter( Completer ): self.future = None return - # TODO: sanitize query + # TODO: sanitize query, probably in C++ code files = ycm_core.UnsavedFileVec() if not query: