mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Dereference pgp key
This commit is contained in:
parent
70c0eeed1e
commit
3b79d5aa63
@ -334,11 +334,15 @@ p_gpg_sign(const char * const str, const char * const fp)
|
|||||||
if (error || key == NULL) {
|
if (error || key == NULL) {
|
||||||
log_error("GPG: Failed to get key. %s %s", gpgme_strsource(error), gpgme_strerror(error));
|
log_error("GPG: Failed to get key. %s %s", gpgme_strsource(error), gpgme_strerror(error));
|
||||||
gpgme_release(ctx);
|
gpgme_release(ctx);
|
||||||
|
if (key) {
|
||||||
|
gpgme_key_unref(key);
|
||||||
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
gpgme_signers_clear(ctx);
|
gpgme_signers_clear(ctx);
|
||||||
error = gpgme_signers_add(ctx, key);
|
error = gpgme_signers_add(ctx, key);
|
||||||
|
gpgme_key_unref(key);
|
||||||
if (error) {
|
if (error) {
|
||||||
log_error("GPG: Failed to load signer. %s %s", gpgme_strsource(error), gpgme_strerror(error));
|
log_error("GPG: Failed to load signer. %s %s", gpgme_strsource(error), gpgme_strerror(error));
|
||||||
gpgme_release(ctx);
|
gpgme_release(ctx);
|
||||||
|
Loading…
Reference in New Issue
Block a user