Don't assert on a file stream if its state is not tracked. Fix pr7831.

llvm-svn: 110392
This commit is contained in:
Zhongxing Xu 2010-08-05 23:24:13 +00:00
parent e2a67168bf
commit cf61a0639d
1 changed files with 4 additions and 1 deletions

View File

@ -373,7 +373,10 @@ const GRState *StreamChecker::CheckDoubleClose(const CallExpr *CE,
assert(Sym); assert(Sym);
const StreamState *SS = state->get<StreamState>(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. // Check: Double close a File Descriptor could cause undefined behaviour.
// Conforming to man-pages // Conforming to man-pages