From: Timo Sirainen Date: Wed, 14 Aug 2024 07:02:09 +0000 (+0300) Subject: quota: quota_rule_parse_limits() - Return error allocated from data stack X-Git-Tag: 2.4.1~685 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=063ae715b4f5e6dbd1ae0b8fbad01fde81996656;p=thirdparty%2Fdovecot%2Fcore.git quota: quota_rule_parse_limits() - Return error allocated from data stack There is no need to use the quota's memory pool for it. --- diff --git a/src/plugins/quota/quota-util.c b/src/plugins/quota/quota-util.c index c08e2ceee1..a9bae4f21d 100644 --- a/src/plugins/quota/quota-util.c +++ b/src/plugins/quota/quota-util.c @@ -179,33 +179,33 @@ quota_rule_parse_limits(struct event *event, multiply = 1024; limit = &rule->bytes_limit; if (str_parse_int64(value, limit, &p) < 0) { - *error_r = p_strdup_printf(root_set->set->pool, + *error_r = t_strdup_printf( "Invalid storage limit: %s", value); return -1; } } else if (strcmp(key, "bytes") == 0) { limit = &rule->bytes_limit; if (str_parse_int64(value, limit, &p) < 0) { - *error_r = p_strdup_printf(root_set->set->pool, + *error_r = t_strdup_printf( "Invalid bytes limit: %s", value); return -1; } } else if (strcmp(key, "messages") == 0) { limit = &rule->count_limit; if (str_parse_int64(value, limit, &p) < 0) { - *error_r = p_strdup_printf(root_set->set->pool, + *error_r = t_strdup_printf( "Invalid bytes messages: %s", value); return -1; } } else { - *error_r = p_strdup_printf(root_set->set->pool, + *error_r = t_strdup_printf( "Unknown rule limit name: %s", key); return -1; } if (quota_limit_parse(root_set, rule, p, multiply, limit, &error) < 0) { - *error_r = p_strdup_printf(root_set->set->pool, + *error_r = t_strdup_printf( "Invalid rule limit value '%s': %s", *args, error); return -1;