From a60d04cc57efd68354dc23bfd16d00beae24f7e0 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Fri, 13 Oct 2006 14:13:31 +0000 Subject: [PATCH] * libltdl/ltdl.c (unload_deplibs, load_deplibs): Avoid memory leaks. --- ChangeLog | 5 +++++ libltdl/ltdl.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) 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; -- 2.47.2