Fix some small memory leaks on REHASH and fix compile warning w/gcc.

This commit is contained in:
Bram Matthys 2023-07-09 13:36:22 +02:00
parent 3250c7c0b4
commit a68fa03ab5
No known key found for this signature in database
GPG key ID: BF8116B163EAAE98
2 changed files with 3 additions and 1 deletions
src

View file

@ -1650,6 +1650,7 @@ void free_iConf(Configuration *i)
safe_free(i->stats_server);
safe_free(i->sasl_server);
safe_free_all_ban_actions(i->handshake_data_flood_ban_action);
safe_free(i->central_spamfilter_url);
// anti-flood:
for (f = i->floodsettings; f; f = f_next)
{

View file

@ -523,7 +523,7 @@ int tkl_config_run_spamfilter(ConfigFile *cf, ConfigEntry *ce, int type)
char *rule = NULL;
time_t bantime = tempiConf.spamfilter_ban_time;
char *banreason = tempiConf.spamfilter_ban_reason;
BanAction *action;
BanAction *action = NULL;
int target = 0;
int match_type = 0;
Match *m = NULL;
@ -2908,6 +2908,7 @@ void _free_tkl(TKL *tkl)
unreal_delete_match(tkl->ptr.spamfilter->match);
if (tkl->ptr.spamfilter->rule)
crule_free(&tkl->ptr.spamfilter->rule);
safe_free_all_ban_actions(tkl->ptr.spamfilter->action);
safe_free(tkl->ptr.spamfilter->prettyrule);
safe_free(tkl->ptr.spamfilter->id);
safe_free(tkl->ptr.spamfilter);