int mail_user_add_parse(const char *const *args, const char **error_r)
{
struct mail_user *user;
- struct stats *diff_stats;
+ struct stats *empty_stats, *diff_stats;
buffer_t *buf;
const char *service, *error;
user->name, service);
return -1;
}
+ empty_stats = stats_alloc(pool_datastack_create());
diff_stats = stats_alloc(pool_datastack_create());
- if (!stats_import(buf->data, buf->used, user->stats, diff_stats, &error)) {
+ if (!stats_import(buf->data, buf->used, empty_stats, diff_stats, &error)) {
*error_r = t_strdup_printf("ADD-USER %s %s: %s",
user->name, service, error);
return -1;