Skip to content
Snippets Groups Projects
Commit 72a7312c authored by Alexander Schnitzler's avatar Alexander Schnitzler Committed by Christian Kuhn
Browse files

[BUGFIX] Avoid memory leak during file searches

During the file search in the file module the search result
is only limited to possibly matching folders. That itself
decreases the search over all files in a storage but it
still does not prevent memory leaks, where the result
of possible folders contain a decent amount of files.

Example:
fileadmin has a total of 10.000 files.
fileadmin has a subfolder called foo
fileadmin/foo holds a subset of 1000 files.
fileadmin/foo holds the file bar

A search for bar asks the database for all folders that contain
files with the matching identifier bar. As a result, only the
folder fileadmin/foo is returned which already excludes 9000
possible files.

Still, the resultset contains 1000 files, whoose name is
compared php-wise with the search string. During that
foreach loop each a file object with a decent memory
footprint will be created. This easily exceeds the
available memory limit.

Resolves: #73032
Releases: master, 7.6
Change-Id: Icf46e05274c671db344797d207afefc...
parent 9173bea0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment