]> granicus.if.org Git - clang/commitdiff
[analyzer] Correctly initialize a variable and hopefully fix crashes.
authorJordy Rose <jediknil@belkadan.com>
Wed, 24 Aug 2011 04:48:19 +0000 (04:48 +0000)
committerJordy Rose <jediknil@belkadan.com>
Wed, 24 Aug 2011 04:48:19 +0000 (04:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138424 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Core/CFRefCount.cpp

index ddae5d73a8858a49eb43a5bd7313613456de94ff..12ee0f3d712e62df1cba1bec810b630fc0354938 100644 (file)
@@ -3584,7 +3584,7 @@ const ProgramState *
 RetainReleaseChecker::handleSymbolDeath(const ProgramState *state,
                                         SymbolRef sid, RefVal V,
                                     SmallVectorImpl<SymbolRef> &Leaked) const {
-  bool hasLeak;
+  bool hasLeak = false;
   if (V.isOwned())
     hasLeak = true;
   else if (V.isNotOwned() || V.isReturnedOwned())