Skip to content

Commit

Permalink
lib-storage: Don't unnecessarily duplicate user's all setting strings
Browse files Browse the repository at this point in the history
user->unexpanded_set and user->set have the same life-time, so they can
point to same strings.
  • Loading branch information
sirainen authored and GitLab committed Feb 6, 2017
1 parent c6108c1 commit 3c2e763
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib-storage/mail-user.c
Expand Up @@ -61,7 +61,7 @@ struct mail_user *mail_user_alloc(const char *username,
user->username = p_strdup(pool, username);
user->set_info = set_info;
user->unexpanded_set = settings_dup(set_info, set, pool);
user->set = settings_dup(set_info, set, pool);
user->set = settings_dup_with_pointers(set_info, user->unexpanded_set, pool);
user->service = master_service_get_name(master_service);
user->default_normalizer = uni_utf8_to_decomposed_titlecase;
user->session_create_time = ioloop_time;
Expand Down

0 comments on commit 3c2e763

Please sign in to comment.