Skip to content

Commit

Permalink
Bug 1305791 - Clear result.mSegments if MoveFallible failed. r=billm
Browse files Browse the repository at this point in the history
MozReview-Commit-ID: 8UaGt1OEfhh
  • Loading branch information
kanru committed Sep 30, 2016
1 parent 64d3540 commit a85c5f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mfbt/BufferList.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ BufferList<AllocPolicy>::MoveFallible(bool* aSuccess, OtherAllocPolicy aAP)

if (!toAdvance || !result.mSegments.append(typename BufferList<OtherAllocPolicy>::Segment(iter.mData, toAdvance, toAdvance))) {
*aSuccess = false;
result.mSegments.clear();
return result;
}
iter.Advance(*this, toAdvance);
Expand Down

0 comments on commit a85c5f1

Please sign in to comment.