Free allocated memory in case of read failure.

This commit is contained in:
Bartosz Taudul 2024-02-07 17:14:04 +01:00
parent d46ffb4e9f
commit 312713b83c
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -3928,6 +3928,10 @@ void Profiler::HandleSourceCodeQuery( char* data, char* image, uint32_t id )
TracyLfqCommit;
ok = true;
}
else
{
tracy_free_fast( ptr );
}
}
}
}
@ -3959,6 +3963,10 @@ void Profiler::HandleSourceCodeQuery( char* data, char* image, uint32_t id )
TracyLfqCommit;
ok = true;
}
else
{
tracy_free_fast( ptr );
}
}
close( d );
}
@ -3985,6 +3993,10 @@ void Profiler::HandleSourceCodeQuery( char* data, char* image, uint32_t id )
TracyLfqCommit;
ok = true;
}
else
{
tracy_free_fast( ptr );
}
}
}