[cfe-commits] r110471 - /cfe/trunk/lib/Checker/MallocChecker.cpp
Ted Kremenek
kremenek at apple.com
Fri Aug 6 14:12:49 PDT 2010
Author: kremenek
Date: Fri Aug 6 16:12:49 2010
New Revision: 110471
URL: http://llvm.org/viewvc/llvm-project?rev=110471&view=rev
Log:
Use 'GenerateNode()' instead of 'GenerateSink()' when reporting a leak. A leak is not a hard enough bug to stop analyzing a path.
Modified:
cfe/trunk/lib/Checker/MallocChecker.cpp
Modified: cfe/trunk/lib/Checker/MallocChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/MallocChecker.cpp?rev=110471&r1=110470&r2=110471&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/MallocChecker.cpp (original)
+++ cfe/trunk/lib/Checker/MallocChecker.cpp Fri Aug 6 16:12:49 2010
@@ -650,9 +650,8 @@
SymbolRef Sym = l.getLocSymbolInBase();
if (Sym) {
const RefState *RS = C.getState()->get<RegionState>(Sym);
- if (RS)
- if (RS->isReleased()) {
- ExplodedNode *N = C.GenerateSink();
+ if (RS && RS->isReleased()) {
+ if (ExplodedNode *N = C.GenerateNode()) {
if (!BT_UseFree)
BT_UseFree = new BuiltinBug("Use dynamically allocated memory after"
" it is freed.");
@@ -661,6 +660,7 @@
N);
C.EmitReport(R);
}
+ }
}
}
More information about the cfe-commits
mailing list