[gnutls-devel] GnuTLS | gnutls_rnd manage memory per-thread (!1647)
Read-only notification of GnuTLS library development activities
gnutls-devel at lists.gnutls.org
Mon Sep 26 13:40:18 CEST 2022
Zoltán Fridrich started a new discussion on lib/random.c: https://gitlab.com/gnutls/gnutls/-/merge_requests/1647#note_1114215674
> -
> -/* A global list of all allocated contexts - to be
> - * used during deinitialization. */
> -GNUTLS_STATIC_MUTEX(gnutls_rnd_ctx_list_mutex);
> -static struct rnd_ctx_list_st *head = NULL;
> +static size_t hhasher(const void *entry, size_t n)
> +{
> + (void)entry;
> + return gl_thread_self() % n;
> +}
>
> -static int append(void *ctx)
> +static void free_ctx(void *ctx)
> {
> - struct rnd_ctx_list_st *e = gnutls_malloc(sizeof(*e));
> + hash_remove(htable, ctx);
might cause problems when set as data_freer in hash_initialize
--
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/merge_requests/1647#note_1114215674
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20220926/3b3e054d/attachment.html>
More information about the Gnutls-devel
mailing list