mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-27 03:42:40 +00:00
Fix a memory leak when transferring lots of small files
This commit is contained in:
parent
56af770943
commit
1af19fbf1b
@ -2087,8 +2087,15 @@ class SFTP extends SSH2
|
||||
if ($i > 0) {
|
||||
$break_loop = false;
|
||||
while ($i > 0) {
|
||||
$response = $this->_get_sftp_packet();
|
||||
$i--;
|
||||
|
||||
if ($break_loop) {
|
||||
$this->_get_sftp_packet();
|
||||
continue;
|
||||
} else {
|
||||
$response = $this->_get_sftp_packet();
|
||||
}
|
||||
|
||||
switch ($this->packet_type) {
|
||||
case NET_SFTP_DATA:
|
||||
$temp = substr($response, 4);
|
||||
|
Loading…
Reference in New Issue
Block a user