diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-01-13 18:45:36 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-01-13 18:45:36 +0000 |
commit | bb239b231b1d3d3e870d5fbc4bb45b4cb6a7c74e (patch) | |
tree | 7ee2a4522fe0579374bdd7ba8f10e45a8f31cd15 | |
parent | 0efc2c1716be4f1c5f1343cad3b047e74861f030 (diff) |
Add extra null check in clang_disposeString().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93328 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | tools/CIndex/CIndex.cpp | 2 |
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); } |