dlopen/dlclose caused memory leak?

Joakim Tjernlund Joakim.Tjernlund at transmode.se
Wed Mar 11 12:06:47 UTC 2009


> Hi,
> 
> I used uclibc-0.9.29,
> 
> /*dltest.c*/
> > #include <stdio.h>
> > #include <dlfcn.h>
> >
> > #define MYLIB "/flash/lib/libdev.so"
> >
> > int main (void){
> >   void *handle;
> >   while (1){
> >       handle = dlopen (MYLIB, RTLD_LAZY);
> >       if (!handle){
> >           fputs (dlerror(), stderr);
> >           exit (1);
> >         }
> >       dlclose (handle);
> >     }
> > }
> /*dltest.c*/
> 
> Pls comment,
> Thanks,
> czy

I remember plugging a memory leak in this area, probably
after 0.9.29, try a newer uClibc version.

 Jocke


More information about the uClibc mailing list