core: Fix leakage of address for mail only uids
authorAndre Heinecke <aheinecke@intevation.de>
Wed, 1 Feb 2017 17:03:35 +0000 (18:03 +0100)
committerAndre Heinecke <aheinecke@intevation.de>
Wed, 1 Feb 2017 17:06:22 +0000 (18:06 +0100)
commitb5075030bec9b21bf4e515bc1686df3fa43eced2
treed8f37fd1e593fc875e720a6fbcf844bd10af69f2
parenta28d31fdb623f2ee30e8094d09f1a0d1ae446a9b
core: Fix leakage of address for mail only uids

* src/key.c (gpgme_key_unref): Always free address if set.
(_gpgme_key_append_name): Remove memory optimization for address.

--
The check if address is not allocated would now be more complicated
then just comparing it to email because email is set to address
also when an email was not parsed from the user id.
src/key.c