Skip to content

Commit 0629378

Browse files
committed
Merge pull request #24387 from owncloud/locking-mark-reload-free
free up memory when releasing the last shared lock
2 parents f8c04a4 + 9677681 commit 0629378

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/private/Lock/AbstractLockingProvider.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ protected function markRelease($path, $type) {
7777
if ($type === self::LOCK_SHARED) {
7878
if (isset($this->acquiredLocks['shared'][$path]) and $this->acquiredLocks['shared'][$path] > 0) {
7979
$this->acquiredLocks['shared'][$path]--;
80+
if ($this->acquiredLocks['shared'][$path] === 0) {
81+
unset($this->acquiredLocks['shared'][$path]);
82+
}
8083
}
8184
} else if ($type === self::LOCK_EXCLUSIVE) {
8285
unset($this->acquiredLocks['exclusive'][$path]);

0 commit comments

Comments
 (0)