changeset 21249:a75e52d91e65

mail-crypt: Do not try to read error from unset variable
author Aki Tuomi <aki.tuomi@dovecot.fi>
date Wed, 30 Nov 2016 00:04:53 +0200
parents 31d8446fb62f
children e0aad1bacb5f
files src/plugins/mail-crypt/mail-crypt-acl-plugin.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/plugins/mail-crypt/mail-crypt-acl-plugin.c	Mon Nov 28 23:05:16 2016 +0200
+++ b/src/plugins/mail-crypt/mail-crypt-acl-plugin.c	Wed Nov 30 00:04:53 2016 +0200
@@ -256,13 +256,12 @@
 		/* setting rights for specific user: we can encrypt the
 		   mailbox key for the user. */
 		username = update->rights.identifier;
-		ret = mail_crypt_acl_has_user_read_right(aclobj, username, &error);
+		ret = mail_crypt_acl_has_user_read_right(aclobj, username, NULL);
 
 		if (ret < 0) {
 			i_error("mail-crypt-acl-plugin: "
-				"mail_crypt_acl_has_user_read_right(%s) failed: %s",
-				username,
-				error);
+				"mail_crypt_acl_has_user_read_right(%s) failed",
+				username);
 			break;
 		}
 
@@ -332,8 +331,9 @@
 		   we could in theory use per-group encrypted keys, which the
 		   users belonging to the group would able to decrypt with
 		   their private key, but that becomes quite complicated. */
-		if ((ret = mail_crypt_acl_has_nonuser_read_right(aclobj, &error)) < 0) {
-		    i_error("mail-crypt-acl-plugin: %s", error);
+		if ((ret = mail_crypt_acl_has_nonuser_read_right(aclobj, NULL)) < 0) {
+		    i_error("mail-crypt-acl-plugin: "
+			    "mail_crypt_acl_has_nonuser_read_right failed");
 		} else if ((ret = mail_crypt_acl_update_private_key(box,
 								    NULL,
 								    TRUE,