Skip to content

Commit

Permalink
mail-crypt: Do not free global keys if no error has occured
Browse files Browse the repository at this point in the history
  • Loading branch information
cmouse authored and villesavolainen committed Jan 30, 2018
1 parent 040e8d3 commit c899e22
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/plugins/mail-crypt/mail-crypt-pluginenv.c
Expand Up @@ -100,6 +100,7 @@ int mail_crypt_global_keys_load_pluginenv(const char *set_prefix,
error_r) < 0)
ret = -1;

mail_crypt_global_keys_free(global_keys_r);
if (ret != 0)
mail_crypt_global_keys_free(global_keys_r);
return ret;
}

0 comments on commit c899e22

Please sign in to comment.