1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 09:37:56 +00:00

fix: edge case file leak if error while making torrent (#2560)

found by Coverity
This commit is contained in:
Charles Kerr 2022-02-01 01:11:13 -06:00 committed by GitHub
parent fdff2893b6
commit 329c4d80e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -318,7 +318,7 @@ static std::vector<std::byte> getHashInfo(tr_metainfo_builder* b)
b->my_errno = EIO;
tr_snprintf(b->errfile, sizeof(b->errfile), "error hashing piece %" PRIu32, b->pieceIndex);
b->result = TR_MAKEMETA_IO_READ;
return {};
break;
}
walk = std::copy(std::begin(*digest), std::end(*digest), walk);