Skip to content

Commit

Permalink
SERVER-19951 do not read unitialized variable in find command
Browse files Browse the repository at this point in the history
  • Loading branch information
dstorch committed Aug 14, 2015
1 parent 86eddcd commit 9f8dc3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mongo/db/commands/find_cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ class FindCmd : public Command {
// 5) Stream query results, adding them to a BSONArray as we go.
BSONArrayBuilder firstBatch;
BSONObj obj;
PlanExecutor::ExecState state;
PlanExecutor::ExecState state = PlanExecutor::ADVANCED;
long long numResults = 0;
while (!FindCommon::enoughForFirstBatch(pq, numResults, firstBatch.len()) &&
PlanExecutor::ADVANCED == (state = cursorExec->getNext(&obj, NULL))) {
Expand Down

0 comments on commit 9f8dc3a

Please sign in to comment.