Skip to content

Commit 6e8417c

Browse files
committed
Relax an assertion. Various cases could lead to non-symbol values.
llvm-svn: 103707
1 parent bb4ea81 commit 6e8417c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

clang/lib/Checker/MallocChecker.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,10 @@ const GRState *MallocChecker::FreeMemAux(CheckerContext &C, const CallExpr *CE,
182182
return state;
183183

184184
SymbolRef Sym = ArgVal.getAsLocSymbol();
185-
assert(Sym);
185+
186+
// Various cases could lead to non-symbol values here.
187+
if (!Sym)
188+
return state;
186189

187190
const RefState *RS = state->get<RegionState>(Sym);
188191

0 commit comments

Comments
 (0)