aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files
diff options
context:
space:
mode:
authorPytal <24800714+Pytal@users.noreply.github.com>2021-12-09 15:59:51 -0800
committerGitHub <noreply@github.com>2021-12-09 15:59:51 -0800
commitc019e33b9990cac4b81a71589bda9f8670c198e3 (patch)
tree2cefd73d3e4ff4ab918136e6746a7e9c692d8bed /lib/private/Files
parent92d3520106c34601b884d7c22835486ae2aeb203 (diff)
parent6f81e60bce600185f2bb37b36187b8751aa28344 (diff)
downloadnextcloud-server-c019e33b9990cac4b81a71589bda9f8670c198e3.tar.gz
nextcloud-server-c019e33b9990cac4b81a71589bda9f8670c198e3.zip
Merge pull request #30160 from nextcloud/bugfix/noid/encryption-wrapper-fclose-check
Diffstat (limited to 'lib/private/Files')
-rw-r--r--lib/private/Files/Storage/Wrapper/Encryption.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php
index 308952c2a31..3ee715ae3d3 100644
--- a/lib/private/Files/Storage/Wrapper/Encryption.php
+++ b/lib/private/Files/Storage/Wrapper/Encryption.php
@@ -784,8 +784,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) {