diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-05-19 11:28:23 +0300 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-05-19 11:28:23 +0300 |
commit | ceea3e9104362fe666e417e3c43aff00f5e4c6af (patch) | |
tree | 35769f9f610dca15c8b036025d821e8f12a9bf46 /lib | |
parent | fe1b8adf0873f1ae89dec2e164ca3b02988cad74 (diff) | |
parent | e36d70c0deba93f8b7e4291b0be713e3e5caddb6 (diff) |
Merge pull request #24705 from owncloud/locking-mark-reload-free-9
[9.0] free up memory when releasing the last shared lock
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/lock/abstractlockingprovider.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/lock/abstractlockingprovider.php b/lib/private/lock/abstractlockingprovider.php index 7dee8c709a0..81136c5ee45 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]); |