diff --git a/contrib/pgcrypto/pgp-pubenc.c b/contrib/pgcrypto/pgp-pubenc.c index de729476f59..7db6ce1ee9d 100644 --- a/contrib/pgcrypto/pgp-pubenc.c +++ b/contrib/pgcrypto/pgp-pubenc.c @@ -199,7 +199,7 @@ pgp_write_pubenc_sesskey(PGP_Context * ctx, PushFilter * dst) PGP_PubKey *pk = ctx->pub_key; uint8 ver = 3; PushFilter *pkt = NULL; - uint8 algo = pk->algo; + uint8 algo; if (pk == NULL) { @@ -207,6 +207,8 @@ pgp_write_pubenc_sesskey(PGP_Context * ctx, PushFilter * dst) return PXE_BUG; } + algo = pk->algo; + /* * now write packet */