mirror of
https://github.com/aria2/aria2.git
synced 2024-12-29 14:14:53 +00:00
ftp, sftp: Fix heap-after-free bug on exception
This commit is contained in:
parent
70541498d8
commit
bb8df11d7e
@ -467,12 +467,12 @@ bool FtpNegotiationCommand::onFileSizeDetermined(int64_t totalLength)
|
||||
poolConnection();
|
||||
return false;
|
||||
}
|
||||
checkIntegrityEntry->pushNextCommand(std::unique_ptr<Command>(this));
|
||||
// We have to make sure that command that has Request object must
|
||||
// have segment after PieceStorage is initialized. See
|
||||
// AbstractCommand::execute()
|
||||
getSegmentMan()->getSegmentWithIndex(getCuid(), 0);
|
||||
|
||||
checkIntegrityEntry->pushNextCommand(std::unique_ptr<Command>(this));
|
||||
prepareForNextAction(std::move(checkIntegrityEntry));
|
||||
|
||||
disableReadCheckSocket();
|
||||
|
@ -299,12 +299,12 @@ void SftpNegotiationCommand::onFileSizeDetermined(int64_t totalLength)
|
||||
poolConnection();
|
||||
return;
|
||||
}
|
||||
checkIntegrityEntry->pushNextCommand(std::unique_ptr<Command>(this));
|
||||
// We have to make sure that command that has Request object must
|
||||
// have segment after PieceStorage is initialized. See
|
||||
// AbstractCommand::execute()
|
||||
getSegmentMan()->getSegmentWithIndex(getCuid(), 0);
|
||||
|
||||
checkIntegrityEntry->pushNextCommand(std::unique_ptr<Command>(this));
|
||||
prepareForNextAction(std::move(checkIntegrityEntry));
|
||||
|
||||
disableReadCheckSocket();
|
||||
|
Loading…
Reference in New Issue
Block a user