]> granicus.if.org Git - clang/commitdiff
[c-index-test] Fix memory leak in c-index-test tool.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 21 Mar 2017 21:34:05 +0000 (21:34 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Tue, 21 Mar 2017 21:34:05 +0000 (21:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298441 91177308-0d34-0410-b5e6-96231b3b80d8

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

index dbd40b86b7453fa96bd4e1bca408556140e9af8c..0dde4c7cc7643d651887659bfa1e633a8ea1eb9c 100644 (file)
@@ -717,6 +717,7 @@ static void PrintCursor(CXCursor Cursor, const char *CommentSchemaFile) {
           CXType Underlying = clang_getTypedefDeclUnderlyingType(Referenced);
           CXString S = clang_getTypeSpelling(Underlying);
           printf(" (Transparent: %s)", clang_getCString(S));
+          clang_disposeString(S);
         }
       }
     }