From: Eric Blake Date: Fri, 13 Oct 2006 14:13:31 +0000 (+0000) Subject: * libltdl/ltdl.c (unload_deplibs, load_deplibs): Avoid memory X-Git-Tag: release-1-5-23b~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a60d04cc57efd68354dc23bfd16d00beae24f7e0;p=thirdparty%2Flibtool.git * libltdl/ltdl.c (unload_deplibs, load_deplibs): Avoid memory leaks. --- diff --git a/ChangeLog b/ChangeLog index 4546e124a..3c842eddf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-10-13 Eric Blake + + * libltdl/ltdl.c (unload_deplibs, load_deplibs): Avoid memory + leaks. + 2006-08-25 Ralf Wildenhues * ltmain.in (link mode): Pass through `--coverage', for GCC. diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index dc4e4127b..d3528a7f4 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -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;