Bug#725522: libgnutls28: memory leak calling gnutls_global_init/gnutls_global_deinit

Tim Rühsen tim.ruehsen at gmx.de
Sun Oct 6 19:30:49 UTC 2013


Package: libgnutls28
Version: 3.2.4-4
Severity: normal

Dear Maintainer,

calling gnutls_global_init() followed by gnutls_global_deinit() leaves one 
memory chunk
unfreed. That's what valgrind says:

==17498== HEAP SUMMARY:
==17498==     in use at exit: 32 bytes in 1 blocks
==17498==   total heap usage: 2,198 allocs, 2,197 frees, 324,240 bytes 
allocated
==17498== 
==17498== 32 bytes in 1 blocks are still reachable in loss record 1 of 1
==17498==    at 0x4C2B514: calloc (vg_replace_malloc.c:593)
==17498==    by 0x620865F: _dlerror_run (dlerror.c:141)
==17498==    by 0x62080C0: dlopen@@GLIBC_2.2.5 (dlopen.c:87)
==17498==    by 0x5703ACA: dlopen_and_get_function_list (in /usr/lib/x86_64-
linux-gnu/libp11-kit.so.0.0.0)
==17498==    by 0x5704909: _p11_kit_initialize_registered_unlocked_reentrant 
(in /usr/lib/x86_64-linux-gnu/libp11-kit.so.0.0.0)
==17498==    by 0x5704CCC: p11_kit_initialize_registered (in /usr/lib/x86_64-
linux-gnu/libp11-kit.so.0.0.0)
==17498==    by 0x4E88037: gnutls_pkcs11_init (in /usr/lib/x86_64-linux-
gnu/libgnutls.so.28.25.0)
==17498==    by 0x4E719A2: gnutls_global_init (in /usr/lib/x86_64-linux-
gnu/libgnutls.so.28.25.0)
==17498==    by 0x4006F5: main (in /home/tim/src/mget/tmp/x)

It may be in libp11-kit0 or even in libc6, but that is beyond of my current 
scope.

C source to reproduce the leak:
#include <stdio.h>
#include <gnutls/gnutls.h>
void main(void) {
  gnutls_global_init();
  gnutls_global_deinit();
}


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.10-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libgnutls28 depends on:
ii  libc6              2.17-93
ii  libgmp10           2:5.1.2+dfsg-3
ii  libhogweed2        2.7.1-1
ii  libnettle4         2.7.1-1
ii  libp11-kit0        0.18.5-3
ii  libtasn1-6         3.3-2
ii  multiarch-support  2.17-93
ii  zlib1g             1:1.2.8.dfsg-1

libgnutls28 recommends no packages.

Versions of packages libgnutls28 suggests:
ii  gnutls-bin  3.2.4-4

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnutls-maint/attachments/20131006/3a94b140/attachment.sig>


More information about the Pkg-gnutls-maint mailing list