mirror of
https://github.com/nextcloud/server.git
synced 2026-02-22 01:11:23 -05:00
Merge pull request #30182 from nextcloud/backport/30160/stable21
[stable21] Check resource before closing in encryption wrapper
This commit is contained in:
commit
4df4e6ea4d
1 changed files with 6 additions and 2 deletions
|
|
@ -756,8 +756,12 @@ class Encryption extends Wrapper {
|
|||
fclose($source);
|
||||
fclose($target);
|
||||
} catch (\Exception $e) {
|
||||
fclose($source);
|
||||
fclose($target);
|
||||
if (is_resource($source)) {
|
||||
fclose($source);
|
||||
}
|
||||
if (is_resource($target)) {
|
||||
fclose($target);
|
||||
}
|
||||
throw $e;
|
||||
}
|
||||
if ($result) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue