diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-05-11 17:53:19 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2023-05-11 17:53:19 +0200 |
commit | 49108880d2ada949caab6d64ec1eb0c81c1b67d6 (patch) | |
tree | fe6464f8a716b132a5d7146113fd0df4dff50477 /apps/encryption | |
parent | a92028f5cdad089bac597e042656545acc78d86b (diff) | |
download | nextcloud-server-49108880d2ada949caab6d64ec1eb0c81c1b67d6.tar.gz nextcloud-server-49108880d2ada949caab6d64ec1eb0c81c1b67d6.zip |
Add fclose on opened resources
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/encryption')
-rw-r--r-- | apps/encryption/lib/Command/DropLegacyFileKey.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/encryption/lib/Command/DropLegacyFileKey.php b/apps/encryption/lib/Command/DropLegacyFileKey.php index acfb7c334ee..f0a5f36f30f 100644 --- a/apps/encryption/lib/Command/DropLegacyFileKey.php +++ b/apps/encryption/lib/Command/DropLegacyFileKey.php @@ -147,6 +147,13 @@ class DropLegacyFileKey extends Command { } $output->writeln('<error>Failed to migrate ' . $path . '</error>'); $output->writeln('<error>' . $e . '</error>', OutputInterface::VERBOSITY_VERBOSE); + } finally { + if (is_resource($copyResource)) { + fclose($copyResource); + } + if (is_resource($sourceResource)) { + fclose($sourceResource); + } } } |