From 75d4c3b09cbb4df6289c8c04749255a1bffc7fd5 Mon Sep 17 00:00:00 2001 From: Ivailo Hristov Date: Thu, 25 Feb 2016 13:55:49 +0200 Subject: [PATCH] Even more memory optimizations --- phpseclib/Net/SFTP.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index d360a542..1eccece1 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -2079,7 +2079,7 @@ class SFTP extends SSH2 } return false; } - + $packet = null; $read += $packet_size; $i++; } @@ -2105,6 +2105,7 @@ class SFTP extends SSH2 } else { fputs($fp, $temp); } + $temp = null; break; case NET_SFTP_STATUS: // could, in theory, return false if !strlen($content) but we'll hold off for the time being @@ -2117,6 +2118,7 @@ class SFTP extends SSH2 } throw new \UnexpectedValueException('Expected SSH_FXP_DATA or SSH_FXP_STATUS'); } + $response = null; } if ($break_loop) {