key_id, &error)) {
i_error("dcrypt_key_id_public() failed: %s",
error);
+ dcrypt_key_unref_public(&user_key);
return -1;
}
const char *hash = binary_to_hex(key_id->data,
res->id = p_strdup(_ctx->pool, hash);
res->success = TRUE;
ctx->matched_keys++;
+ dcrypt_key_unref_public(&user_key);
return 1;
}
struct dcrypt_keypair pair;
ctx->matched_keys++;
}
- if (ctx->userkey_only)
+ if (ctx->userkey_only) {
+ dcrypt_key_unref_public(&user_key);
return 0;
+ }
const char *const *patterns = (const char *const[]){ "*", NULL };