mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
some more memory cleanup in OC_Image
This commit is contained in:
parent
0c19e44a61
commit
0ba9332358
1 changed files with 2 additions and 4 deletions
|
|
@ -317,10 +317,7 @@ class OC_Image {
|
|||
*/
|
||||
public function loadFromFileHandle($handle) {
|
||||
OC_Log::write('core',__METHOD__.'(): Trying', OC_Log::DEBUG);
|
||||
$contents = '';
|
||||
while (!feof($handle)) {
|
||||
$contents .= fread($handle, 8192);
|
||||
}
|
||||
$contents = stream_get_contents($handle);
|
||||
if($this->loadFromData($contents)) {
|
||||
return $this->resource;
|
||||
}
|
||||
|
|
@ -486,6 +483,7 @@ class OC_Image {
|
|||
imagedestroy($process);
|
||||
return false;
|
||||
}
|
||||
imagedestroy($this->resource);
|
||||
$this->resource = $process;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue