]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-dcrypt: Do not unref key twice
authorAki Tuomi <aki.tuomi@dovecot.fi>
Thu, 4 Aug 2016 12:57:22 +0000 (15:57 +0300)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Thu, 4 Aug 2016 12:59:50 +0000 (15:59 +0300)
src/lib-dcrypt/dcrypt-openssl.c

index 11c0002fa6b1dbddde9a8ed27a08206d6d48df67..d1ee6251836b2d733b5f6c275058f0444939ca46 100644 (file)
@@ -1067,7 +1067,6 @@ bool dcrypt_openssl_load_private_key_dovecot_v2(struct dcrypt_private_key **key_
                dcrypt_openssl_unref_public_key(&pubkey);
 
                if (strcmp(binary_to_hex(data->data, data->used), input[9]) != 0) {
-                       dcrypt_openssl_unref_public_key(&pubkey);
                        if (error_r != NULL)
                                *error_r = "No private key available";
                        return FALSE;