[Privoxy-commits] [privoxy] 05/19: load_one_re_filterfile(): Only register content filters for statistics

User Git git at git.privoxy.org
Mon Mar 16 07:54:53 CET 2026


This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository privoxy.

commit 9bddef8b7d367f2d68535c8a48e7f372ffeb90a3
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Thu Mar 5 12:49:04 2026 +0100

    load_one_re_filterfile(): Only register content filters for statistics
    
    Previously all filter types were registered which wasted
    a bit of memory.
---
 loaders.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/loaders.c b/loaders.c
index b973d40a..159d0a1e 100644
--- a/loaders.c
+++ b/loaders.c
@@ -1257,7 +1257,10 @@ int load_one_re_filterfile(struct client_state *csp, int fileid)
          log_error(LOG_LEVEL_RE_FILTER, "Reading in filter \"%s\" (\"%s\"). Type %d.",
             bl->name, bl->description, new_filter);
 #ifdef FEATURE_EXTENDED_STATISTICS
-         register_filter_for_statistics(bl->name);
+         if (new_filter == FT_CONTENT_FILTER)
+         {
+            register_filter_for_statistics(bl->name);
+         }
 #endif
          freez(buf);
          continue;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Privoxy-commits mailing list