diff options
author | Anna Zaks <ganna@apple.com> | 2012-06-20 23:35:57 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2012-06-20 23:35:57 +0000 |
commit | 52a04812e5767dab68efb33ad044760b5b168941 (patch) | |
tree | a51b0551e40c73a373e2ac9934bd43f6b48c6236 /lib/StaticAnalyzer/Checkers/MallocChecker.cpp | |
parent | a114d828a0e0123a2f2661e914a5212da0f684f5 (diff) |
[analyzer] Malloc leak false positive: Allow xpc context to escape.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158875 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/MallocChecker.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/MallocChecker.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/StaticAnalyzer/Checkers/MallocChecker.cpp b/lib/StaticAnalyzer/Checkers/MallocChecker.cpp index 48fdec2d3f..3171c03eb0 100644 --- a/lib/StaticAnalyzer/Checkers/MallocChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/MallocChecker.cpp @@ -1298,6 +1298,12 @@ bool MallocChecker::doesNotFreeMemory(const CallOrObjCMessage *Call, if (FName.equals("pthread_setspecific")) return false; + // White list xpc connection context. + // TODO: Ensure that the deallocation actually happens, need to reason + // about "xpc_connection_set_finalizer_f". + if (FName.equals("xpc_connection_set_context")) + return false; + // White list the 'XXXNoCopy' ObjC functions. if (FName.endswith("NoCopy")) { // Look for the deallocator argument. We know that the memory ownership |