Discussion:
[gt-user] memory leaks in globus_i_thread_pre_activate() and globus_l_gsi_proxy_sign_key()
Osamu Tatebe
2015-06-17 20:50:17 UTC
Permalink
Hi all,

There are memory leaks in globus_i_thread_pre_activate() and
globus_l_gsi_proxy_sign_key() in globus 6.0.1433516164. Here is a
report from valgrind

==12370== 22 bytes in 1 blocks are definitely lost in loss record 26 of 678
==12370== at 0x4A0720A: malloc (vg_replace_malloc.c:296)
==12370== by 0x63ABAA6: globus_eval_path (globus_common_paths.c:205)
==12370== by 0x63BE389: globus_i_thread_pre_activate (globus_thread.c:164)

==12370== 104 (24 direct, 80 indirect) bytes in 1 blocks are
definitely lost in loss record 586 of 678
==12370== at 0x4A0720A: malloc (vg_replace_malloc.c:296)
==12370== by 0x301005D9CD: CRYPTO_malloc (in /usr/lib64/libcrypto.so.1.0.0)
==12370== by 0x30100D4EBC: ??? (in /usr/lib64/libcrypto.so.1.0.0)
==12370== by 0x30100D7D69: ASN1_item_ex_d2i (in
/usr/lib64/libcrypto.so.1.0.0)
==12370== by 0x30100D8403: ASN1_item_d2i (in /usr/lib64/libcrypto.so.1.0.0)
==12370== by 0x30100CC115: ASN1_item_dup (in /usr/lib64/libcrypto.so.1.0.0)
==12370== by 0x533DC81: globus_l_gsi_proxy_sign_key (globus_gsi_proxy.c:1602)

Here is a list of globus_i_thread_pre_activate().

int
globus_i_thread_pre_activate(void)
{
....
result = globus_eval_path("${libdir}", &libdir);
...
lt_dladdsearchdir(libdir);
...
}

This libdir should be free'ed after lt_dladdsearchdir(libdir);

Here is a list of globus_gsi_proxy.c:1602

extension = X509_EXTENSION_dup(extension);

extension seems to be leaked.

Regards,
Osamu

---
Osamu Tatebe
University of Tsukuba

Loading...