mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-21 12:42:25 +00:00
Fix compilation without LTO
When building without link-time-optimization through the KITTY_NO_LTO env var or the setup.py --disable-link-time-optimization option compilation failed with a warning about freeing "ans" memory. Chances are, this is dead code that gets optimized out by LTO.
This commit is contained in:
parent
edb9c924fe
commit
17b7703dab
1 changed files with 2 additions and 2 deletions
|
|
@ -110,9 +110,9 @@ init_rsync(Rsync *ans, size_t block_size, int strong_hash_type, int checksum_typ
|
|||
ans->hasher = ans->hasher_constructor();
|
||||
ans->checksummer = ans->checksummer_constructor();
|
||||
ans->hasher.state = ans->hasher.new();
|
||||
if (ans->hasher.state == NULL) { free(ans); return "Out of memory"; }
|
||||
if (ans->hasher.state == NULL) { free_rsync(ans); return "Out of memory"; }
|
||||
ans->checksummer.state = ans->checksummer.new();
|
||||
if (ans->checksummer.state == NULL) { free(ans); return "Out of memory"; }
|
||||
if (ans->checksummer.state == NULL) { free_rsync(ans); return "Out of memory"; }
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue