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

ChangeLog
libltdl/ltdl.c

index 3f277d02aca37365026a606cecf7b2f083188857..beaab42c3c534a944d05d75c2a36abab817324cc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-10-13  Eric Blake  <ebb9@byu.net>
+
+       * libltdl/ltdl.c (load_deplibs): Avoid memory leak on failure.
+       (unload_deplibs): Avoid memory leak on cleanup.
+
 2006-09-20  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
 
        * libltdl/m4/libtool.m4 (func_mode_compile): Accept files with
index b43d3d0f5cc63f7a8a305e1548260525c496be3e..1cf60857365ae5a1a7ced1a0d35652eba8228717 100644 (file)
@@ -855,7 +855,7 @@ load_deplibs (lt_dlhandle handle, char *deplibs)
 
       cur->deplibs = (lt_dlhandle *) MALLOC (lt__handle, depcount);
       if (!cur->deplibs)
-       goto cleanup;
+       goto cleanup_names;
 
       for (i = 0; i < depcount; ++i)
        {
@@ -903,6 +903,7 @@ unload_deplibs (lt_dlhandle handle)
              errors += lt_dlclose (cur->deplibs[i]);
            }
        }
+      FREE (cur->deplibs);
     }
 
   return errors;