mirror of
https://github.com/thunderbrewhq/bc.git
synced 2025-12-12 01:52:30 +00:00
fix(file): fix mismatched allocation in MakeAbsolutePath
This commit is contained in:
parent
d15affe417
commit
b74865fa61
1 changed files with 4 additions and 4 deletions
|
|
@ -421,23 +421,23 @@ bool MakeAbsolutePath(FileParms* parms) {
|
|||
}
|
||||
|
||||
if (resolved != resolvedbuffer) {
|
||||
Blizzard::Memory::Free(resolved);
|
||||
FREE(resolved);
|
||||
}
|
||||
}
|
||||
|
||||
Blizzard::String::Copy(result, canonical, parms->buffersize);
|
||||
if (canonical != canonicalbuffer) {
|
||||
Blizzard::Memory::Free(canonical);
|
||||
FREE(canonical);
|
||||
}
|
||||
}
|
||||
|
||||
Blizzard::String::Copy(parms->buffer, result, parms->buffersize);
|
||||
|
||||
if (name != namebuffer) {
|
||||
Blizzard::Memory::Free(name);
|
||||
FREE(name);
|
||||
}
|
||||
if (result != resultbuffer) {
|
||||
Blizzard::Memory::Free(result);
|
||||
FREE(result);
|
||||
}
|
||||
|
||||
return *parms->buffer != '\0';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue