forked from OSchip/llvm-project
[analyzer] Fix a bug in SimpleStreamChecker - return after sink.
Thanks Ted. llvm-svn: 167176
This commit is contained in:
parent
48baf7a788
commit
a57e8ffdba
|
@ -126,8 +126,10 @@ void SimpleStreamChecker::checkPreStmt(const CallExpr *Call,
|
|||
// Check if the stream has already been closed.
|
||||
ProgramStateRef State = C.getState();
|
||||
const StreamState *SS = State->get<StreamMap>(FileDesc);
|
||||
if (SS && SS->isClosed())
|
||||
if (SS && SS->isClosed()) {
|
||||
reportDoubleClose(FileDesc, Call, C);
|
||||
return;
|
||||
}
|
||||
|
||||
// Generate the next transition, in which the stream is closed.
|
||||
State = State->set<StreamMap>(FileDesc, StreamState::getClosed());
|
||||
|
|
Loading…
Reference in New Issue