[gnutls-dev] Re: leak using gcrypt

Simon Josefsson jas at extundo.com
Wed Feb 9 18:54:05 CET 2005


"ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio at vodafone.com> writes:

> Using gcrypt gnutls leak some memory (about 2 Kbi).
> Following a small program that leak memory
>
> #include <gnutls/gnutls.h>
>
> int main()
> {
>         gnutls_global_init();
>         gnutls_global_deinit();
>         return 0;
> }
>
> gnutls_global_init calls gc_init to initialize gcrypt however
> gnutls_global_deinit does not call a gc_deinit (which doesn't even
> exist).
> Leak appear in the call of gcry_check_version. From Valgrind log:

Thanks, I believe this is a known issue with libgcrypt.  The memory
should not increase even if you init/deinit several times, as far as I
understood, though.

One of my goal is to make libgcrypt optional (although preferred), but
creating an abstract interface for the public-key operations required
some effort, and I don't have any resources to finish it right now.

It is possible to use Nettle for non-PK operations (hashing, symmetric
ciphers) today, though, but libgcrypt is still required.

Thanks,
Simon



More information about the Gnutls-dev mailing list