]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/ltdl.c (unload_deplibs, load_deplibs): Avoid memory
authorEric Blake <ebb9@byu.net>
Fri, 13 Oct 2006 14:13:31 +0000 (14:13 +0000)
committerEric Blake <ebb9@byu.net>
Fri, 13 Oct 2006 14:13:31 +0000 (14:13 +0000)
leaks.

ChangeLog
libltdl/ltdl.c

index 4546e124a7c34ba4bde8df7fb42dfdca5453480a..3c842eddf4995cb7316911fd86e15296da20624a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-10-13  Eric Blake  <ebb9@byu.net>
+
+       * libltdl/ltdl.c (unload_deplibs, load_deplibs): Avoid memory
+       leaks.
+
 2006-08-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * ltmain.in (link mode): Pass through `--coverage', for GCC.
index dc4e4127ba67a9558a4daa98ee54fb867782d67d..d3528a7f42f73ffb734bc2db73dfda80e72883dd 100644 (file)
@@ -2944,7 +2944,7 @@ load_deplibs (handle, deplibs)
 
       handle->deplibs = (lt_dlhandle*) LT_EMALLOC (lt_dlhandle *, depcount);
       if (!handle->deplibs)
-       goto cleanup;
+       goto cleanup_names;
 
       for (i = 0; i < depcount; ++i)
        {
@@ -2995,6 +2995,7 @@ unload_deplibs (handle)
              errors += lt_dlclose (handle->deplibs[i]);
            }
        }
+      LT_DLFREE (handle->deplibs);
     }
 
   return errors;