r298441 - [c-index-test] Fix memory leak in c-index-test tool.

Argyrios Kyrtzidis via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 21 14:34:05 PDT 2017


Author: akirtzidis
Date: Tue Mar 21 16:34:05 2017
New Revision: 298441

URL: http://llvm.org/viewvc/llvm-project?rev=298441&view=rev
Log:
[c-index-test] Fix memory leak in c-index-test tool.

Modified:
    cfe/trunk/tools/c-index-test/c-index-test.c

Modified: cfe/trunk/tools/c-index-test/c-index-test.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/c-index-test/c-index-test.c?rev=298441&r1=298440&r2=298441&view=diff
==============================================================================
--- cfe/trunk/tools/c-index-test/c-index-test.c (original)
+++ cfe/trunk/tools/c-index-test/c-index-test.c Tue Mar 21 16:34:05 2017
@@ -717,6 +717,7 @@ static void PrintCursor(CXCursor Cursor,
           CXType Underlying = clang_getTypedefDeclUnderlyingType(Referenced);
           CXString S = clang_getTypeSpelling(Underlying);
           printf(" (Transparent: %s)", clang_getCString(S));
+          clang_disposeString(S);
         }
       }
     }




More information about the cfe-commits mailing list