Skip to content
Snippets Groups Projects
Commit 504a3b5e authored by Ahmad Sherif's avatar Ahmad Sherif
Browse files

Fix a memory leak caused by Banzai::Filter::SanitizationFilter

In Banzai::Filter::SanitizationFilter#customize_whitelist, we append
three lambdas that has reference to the SanitizationFilter instance,
which in turn (potentially) has a reference to the following chain:

context hash -> Project instance -> Repository instance -> lookup hash
-> various Rugged instances -> various mmap-ed git pack files.

All of the above is not garbage collected because the array we append
the lambdas to is the constant
HTML::Pipeline::SanitizationFilter::WHITELIST.
parent 30f5b9a5
No related branches found
No related tags found
Loading
Pipeline #
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment