The linked list of library dependencies created by dlopen() was not
being freed by dlclose().

Signed-off-by: Philip Craig <[email protected]>
---
Tested with uClibc 0.9.29 only.
Code inspection shows the error is still present in latest git,
I compile tested there.

 ldso/libdl/libdl.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c
index b88bc48..ee5cd44 100644
--- a/ldso/libdl/libdl.c
+++ b/ldso/libdl/libdl.c
@@ -922,6 +922,10 @@ static int do_dlclose(void *vhandle, int need_fini)
                        free(tpnt);
                }
        }
+       for (rpnt1 = handle->next; rpnt1; rpnt1 = rpnt1_tmp) {
+               rpnt1_tmp = rpnt1->next;
+               free(rpnt1);
+       }
        free(handle->init_fini.init_fini);
        free(handle);
 
-- 
1.7.0.4

_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to