forked from OSchip/llvm-project
Don't assert on a file stream if its state is not tracked. Fix pr7831.
llvm-svn: 110392
This commit is contained in:
parent
e2a67168bf
commit
cf61a0639d
|
@ -373,7 +373,10 @@ const GRState *StreamChecker::CheckDoubleClose(const CallExpr *CE,
|
|||
assert(Sym);
|
||||
|
||||
const StreamState *SS = state->get<StreamState>(Sym);
|
||||
assert(SS);
|
||||
|
||||
// If the file stream is not tracked, return.
|
||||
if (!SS)
|
||||
return state;
|
||||
|
||||
// Check: Double close a File Descriptor could cause undefined behaviour.
|
||||
// Conforming to man-pages
|
||||
|
|
Loading…
Reference in New Issue