libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

memleak in lt_dlexit()


From: Norbert Sendetzky
Subject: memleak in lt_dlexit()
Date: Sun, 11 Apr 2004 19:34:12 +0200
User-agent: KMail/1.6

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all

I've found that user_search_path is not freed if libltdl is finally 
shut down. This results in a memory leak if you call lt_dlinit(), 
lt_dlsetsearchpath("test") and lt_dlexit() in a loop.

There seems to be another one in lt_dlopenext() or in one of its 
called functions, but I haven't found the line yet. It would be nice, 
if someone else would also check for memleaks. Maybe there are more 
around.

Furthermore in try_dlopen() (line 3232 and below in 1.5.4) 
sizeof("string")-1 is used in strncmp(). It seems that this should be 
LT_STRLEN("string") instead, because sizeof(char*)-1 is always 3. 
Thus, the "library_names=" case will never be matched because the 
"libdir=" is used instead.

Thanks


Norbert

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAkB5gZQACgkQxMLs5v5/7eAqUQCeNqB5oL92lsoCNGKSGW3uyz1R
h4cAoKjvygmMXD8XBiLQ1UdYM/L20vEA
=JonC
-----END PGP SIGNATURE-----

Attachment: lt_dlexit_memleak.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]