Fix for memory leak
Some checks failed
Build and Release / reuse (push) Has been cancelled
Build and Release / clang-format (push) Has been cancelled
Build and Release / get-info (push) Has been cancelled
Build and Release / windows-sdl (push) Has been cancelled
Build and Release / macos-sdl (push) Has been cancelled
Build and Release / linux-sdl (push) Has been cancelled
Build and Release / linux-sdl-gcc (push) Has been cancelled
Build and Release / pre-release (push) Has been cancelled

This commit is contained in:
psucien 2025-11-19 18:09:27 +01:00
parent abf9b23277
commit 6fe107a0e3
2 changed files with 6 additions and 2 deletions

View File

@ -517,7 +517,11 @@ u64 Shader::Gcn::FetchShaderData::Hash() const {
for (const auto& attrib : attributes) {
XXH64_update(state, &attrib, sizeof(attrib));
}
return XXH64_digest(state);
const u64 hash = XXH64_digest(state);
XXH64_freeState(state);
return hash;
}
u64 StageSpecialization::Hash() const {
@ -544,6 +548,7 @@ u64 StageSpecialization::Hash() const {
}
u64 hash = XXH64_digest(state);
XXH64_freeState(state);
if (fetch_shader_data) {
hash = HashCombine(hash, fetch_shader_data->Hash());

View File

@ -155,7 +155,6 @@ bool DataBase::Save(BlobType type, const std::string& name, std::vector<u32>&& d
auto path = cache_dir / name;
return WriteVector(type, std::move(path), std::move(data));
return true;
}
void DataBase::Load(BlobType type, const std::string& name, std::vector<u8>& data) {