[pacman-dev] [PATCH 3/3] _alpm_key_in_keychain: cache known keys

Andrew Gregory andrew.gregory.8 at gmail.com
Tue Sep 30 19:40:33 UTC 2014


On 09/30/14 at 03:24pm, Andrew Gregory wrote:
> Implements FS#38042
> 
> Signed-off-by: Andrew Gregory <andrew.gregory.8 at gmail.com>
> ---
>  lib/libalpm/handle.c  | 5 +++++
>  lib/libalpm/handle.h  | 4 ++++
>  lib/libalpm/signing.c | 6 ++++++
>  3 files changed, 15 insertions(+)
> 
> diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
> index 0d8ea34..0dd0e7f 100644
> --- a/lib/libalpm/handle.c
> +++ b/lib/libalpm/handle.c
> @@ -70,6 +70,10 @@ void _alpm_handle_free(alpm_handle_t *handle)
>  	curl_easy_cleanup(handle->curl);
>  #endif
>  
> +#ifdef HAVE_LIBGPGME
> +	FREELIST(handle->known_keys);
> +#endif
> +
>  	regfree(&handle->delta_regex);
>  
>  	/* free memory */
> @@ -85,6 +89,7 @@ void _alpm_handle_free(alpm_handle_t *handle)
>  	FREELIST(handle->noextract);
>  	FREELIST(handle->ignorepkg);
>  	FREELIST(handle->ignoregroup);
> +	FREELIST(handle->known_keys);

Obviously this should only be free'd once... fixed on my 4.2 branch.

apg


More information about the pacman-dev mailing list