gpg: Fix double free with anonymous recipients.
* g10/pubkey-enc.c (get_session_key): Do not release SK.
Bug is in 2.2.18 only.
The semantics of the enum_secret_keys function changed in master.
When back porting this for 2.2.18 I missed this change and thus we ran
into a double free. The patches fixes the regression but is it clumsy.
We need to change the enum_secret_keys interface to avoid such a
surprising behaviour; this needs to be done in master first.
- Regression-due-to: 9a317557c58d2bdcc504b70c366b77f4cac71df7
- GnuPG-bug-id: T4762
- Signed-off-by: Werner Koch <wk@gnupg.org>