]> jfr.im git - irc/unrealircd/unrealircd.git/commitdiff
Central spamfilter: fix memory leak (freeing ce/cfptr)
authorBram Matthys <redacted>
Tue, 11 Jul 2023 13:14:09 +0000 (15:14 +0200)
committerBram Matthys <redacted>
Tue, 11 Jul 2023 13:14:58 +0000 (15:14 +0200)
[skip ci]

src/conf.c

index 1b3af3021a22a02e29361fb861bdc5b3b9dd3f20..3ed98d277702d008537c7546636ee86373477e77 100644 (file)
@@ -11723,6 +11723,7 @@ void central_spamfilter_download_complete(const char *url, const char *file, con
        {
                unreal_log(ULOG_ERROR, "central-spamfilter", "CENTRAL_SPAMFILTER_LOAD_FAILED", NULL,
                        "[Central spamfilter] Errors in the central central_spamfilter.conf -- not loaded.");
+               config_free(cfptr);
                return;
        }
 
@@ -11740,6 +11741,7 @@ void central_spamfilter_download_complete(const char *url, const char *file, con
                           log_data_integer("active_rules", active_rules),
                           log_data_integer("skipped_rules", num_rules - active_rules));
        }
+       config_free(cfptr);
 }
 
 void central_spamfilter_start_download(void)