diff options
-rw-r--r-- | clang/tools/CIndex/CIndex.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/clang/tools/CIndex/CIndex.cpp b/clang/tools/CIndex/CIndex.cpp index 8fba3cf6b5c..ac297e64a13 100644 --- a/clang/tools/CIndex/CIndex.cpp +++ b/clang/tools/CIndex/CIndex.cpp @@ -958,13 +958,8 @@ const char *clang_getCString(CXString string) { // Free CXString. void clang_disposeString(CXString string) { - if (string.MustFreeString) { - if (string.Spelling) { - free((void *)string.Spelling); - string.Spelling = NULL; - } - string.MustFreeString = 0; - } + if (string.MustFreeString) + free((void*)string.Spelling); } unsigned clang_getCursorColumn(CXCursor C) |