aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/CIndex/CIndex.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp
index d6e7d0c2a6..ff8124de46 100644
--- a/tools/CIndex/CIndex.cpp
+++ b/tools/CIndex/CIndex.cpp
@@ -1065,7 +1065,7 @@ const char *clang_getCString(CXString string) {
}
void clang_disposeString(CXString string) {
- if (string.MustFreeString)
+ if (string.MustFreeString && string.Spelling)
free((void*)string.Spelling);
}