Commit d5f1f1bb authored by Aditya Kumar's avatar Aditya Kumar Committed by Facebook GitHub Bot

Assign buf_ to nullptr in freeExtBuffer to mitigate damage from double free

Differential Revision: D21059558

fbshipit-source-id: 588e6ec2a6fdaf70ea5c03810358c84dedf81911
parent 97fc9b61
......@@ -1040,6 +1040,10 @@ void IOBuf::freeExtBuffer() noexcept {
}
SharedInfo::invokeAndDeleteEachObserver(
observerListHead, [](auto& entry) { entry.afterFreeExtBuffer(); });
#if FOLLY_MOBILE
buf_ = nullptr;
#endif
}
void IOBuf::allocExtBuffer(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment