Browse files

Qfs client: fix completion recursion unwinding in Reader::Impl::Repor…

…tCompletion(), by ensuring that the chunk reader still exists after completion invocation in TryToCloseIdle().
  • Loading branch information...
1 parent c28df6f commit 50fa2bebfc121d5773799fffc748224e8140b9fd @mikeov mikeov committed Feb 25, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/cc/libclient/Reader.cc
View
4 src/cc/libclient/Reader.cc
@@ -1983,11 +1983,11 @@ class Reader::Impl : public QCRefCountedObj
return (theOffset < theLeftEdge || theRightEdge <= theOffset);
}
bool TryToCloseIdle(
- ChunkReader* inReaderPtr)
+ const ChunkReader* inReaderPtr)
{
ChunkReader* thePtr = Readers::Back(mReaders);
if (! thePtr) {
- thePtr = inReaderPtr;
+ return (! inReaderPtr); // Already deleted.
}
bool theRetFlag = true;
while (thePtr) {

0 comments on commit 50fa2be

Please sign in to comment.