This commit is contained in:
Kovid Goyal 2023-10-08 08:33:05 +05:30
commit f03027c33d
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -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;
}