diff --git a/lib/Checker/MallocChecker.cpp b/lib/Checker/MallocChecker.cpp index a22df30469..086dbd8fdd 100644 --- a/lib/Checker/MallocChecker.cpp +++ b/lib/Checker/MallocChecker.cpp @@ -182,7 +182,10 @@ const GRState *MallocChecker::FreeMemAux(CheckerContext &C, const CallExpr *CE, return state; SymbolRef Sym = ArgVal.getAsLocSymbol(); - assert(Sym); + + // Various cases could lead to non-symbol values here. + if (!Sym) + return state; const RefState *RS = state->get(Sym);