Merge pull request #201 from nosferalatu/dont_early_out_in_memfree_when_ptr_is_zero

Change ev.ptr nullptr early-out to properly handle nullptrs
This commit is contained in:
Bartosz Taudul 2021-04-21 23:44:21 +02:00 committed by GitHub
commit 4a1142fddf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5602,11 +5602,11 @@ MemEvent* Worker::ProcessMemFreeImpl( uint64_t memname, MemData& memdata, const
const auto refTime = m_refTimeSerial + ev.time;
m_refTimeSerial = refTime;
if( ev.ptr == 0 ) return nullptr;
auto it = memdata.active.find( ev.ptr );
if( it == memdata.active.end() )
{
if( ev.ptr == 0 ) return nullptr;
if( !m_ignoreMemFreeFaults )
{
CheckThreadString( ev.thread );