[cfe-commits] r93328 - /cfe/trunk/tools/CIndex/CIndex.cpp
Ted Kremenek
kremenek at apple.com
Wed Jan 13 10:45:36 PST 2010
Author: kremenek
Date: Wed Jan 13 12:45:36 2010
New Revision: 93328
URL: http://llvm.org/viewvc/llvm-project?rev=93328&view=rev
Log:
Add extra null check in clang_disposeString().
Modified:
cfe/trunk/tools/CIndex/CIndex.cpp
Modified: cfe/trunk/tools/CIndex/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/CIndex/CIndex.cpp?rev=93328&r1=93327&r2=93328&view=diff
==============================================================================
--- cfe/trunk/tools/CIndex/CIndex.cpp (original)
+++ cfe/trunk/tools/CIndex/CIndex.cpp Wed Jan 13 12:45:36 2010
@@ -1065,7 +1065,7 @@
}
void clang_disposeString(CXString string) {
- if (string.MustFreeString)
+ if (string.MustFreeString && string.Spelling)
free((void*)string.Spelling);
}
More information about the cfe-commits
mailing list