r214506 - Fix a memory leak - dispose of the CXString after printing it in mangling.

Eli Bendersky eliben at google.com
Fri Aug 1 05:55:44 PDT 2014


Author: eliben
Date: Fri Aug  1 07:55:44 2014
New Revision: 214506

URL: http://llvm.org/viewvc/llvm-project?rev=214506&view=rev
Log:
Fix a memory leak - dispose of the CXString after printing it in mangling.

Thanks to kcc@ for noticing.

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=214506&r1=214505&r2=214506&view=diff
==============================================================================
--- cfe/trunk/tools/c-index-test/c-index-test.c (original)
+++ cfe/trunk/tools/c-index-test/c-index-test.c Fri Aug  1 07:55:44 2014
@@ -1372,6 +1372,7 @@ static enum CXChildVisitResult PrintMang
   PrintCursor(cursor, NULL);
   MangledName = clang_Cursor_getMangling(cursor);
   printf(" [mangled=%s]\n", clang_getCString(MangledName));
+  clang_disposeString(MangledName);
   return CXChildVisit_Continue;
 }
 





More information about the cfe-commits mailing list