[analyzer] Fix a false positive reported on rare strange code, which happens to be in JSONKit

llvm-svn: 183055
diff --git a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
index 11abe9a..bb2e2df 100644
--- a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
@@ -1890,6 +1890,12 @@
       return false;
     }
 
+    // We should escape on call to 'init'. This is especially relevant to the
+    // receiver, as the corresponding symbol is usually not referenced after
+    // the call.
+    if (Msg->getMethodFamily() == OMF_init)
+      return false;
+
     // Otherwise, assume that the method does not free memory.
     // Most framework methods do not free memory.
     return true;