Skip to content

Commit

Permalink
[Minor] Another leak
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Aug 20, 2023
1 parent fb2b4fd commit 1931487
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/fuzzy_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -2227,7 +2227,7 @@ rspamd_fuzzy_maybe_load_ratelimits(struct rspamd_fuzzy_storage_ctx *ctx)
if (access(path, R_OK) != -1) {
struct ucl_parser *parser = ucl_parser_new(UCL_PARSER_NO_IMPLICIT_ARRAYS | UCL_PARSER_DISABLE_MACRO);
if (ucl_parser_add_file(parser, path)) {
const ucl_object_t *obj = ucl_parser_get_object(parser);
ucl_object_t *obj = ucl_parser_get_object(parser);
int loaded = 0;

if (ucl_object_type(obj) == UCL_ARRAY) {
Expand Down Expand Up @@ -2274,11 +2274,13 @@ rspamd_fuzzy_maybe_load_ratelimits(struct rspamd_fuzzy_storage_ctx *ctx)
}
}

ucl_parser_free(parser);

msg_info("loaded %d ratelimit objects", loaded);
}

ucl_object_unref(obj);
}

ucl_parser_free(parser);
}
}

Expand Down

0 comments on commit 1931487

Please sign in to comment.