summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <DeepDiver1975@users.noreply.github.com>2016-05-03 12:03:41 +0200
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-05-03 12:03:41 +0200
commit06293783e0d291a5595b55a3268d8bc0704277db (patch)
treed9fa7808571af4f17b47dd3376678d81942447d7 /lib
parentf8c04a4219ec5118b138b4a4676a59258b5402b7 (diff)
parent9677681a37b2e999558f30e9383ea2a9bf9f8c24 (diff)
downloadnextcloud-server-06293783e0d291a5595b55a3268d8bc0704277db.tar.gz
nextcloud-server-06293783e0d291a5595b55a3268d8bc0704277db.zip
Merge pull request #24387 from owncloud/locking-mark-reload-free
free up memory when releasing the last shared lock
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Lock/AbstractLockingProvider.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/Lock/AbstractLockingProvider.php b/lib/private/Lock/AbstractLockingProvider.php
index 1886fbea082..ff9f99a9630 100644
--- a/lib/private/Lock/AbstractLockingProvider.php
+++ b/lib/private/Lock/AbstractLockingProvider.php
@@ -77,6 +77,9 @@ abstract class AbstractLockingProvider implements ILockingProvider {
if ($type === self::LOCK_SHARED) {
if (isset($this->acquiredLocks['shared'][$path]) and $this->acquiredLocks['shared'][$path] > 0) {
$this->acquiredLocks['shared'][$path]--;
+ if ($this->acquiredLocks['shared'][$path] === 0) {
+ unset($this->acquiredLocks['shared'][$path]);
+ }
}
} else if ($type === self::LOCK_EXCLUSIVE) {
unset($this->acquiredLocks['exclusive'][$path]);