Merge pull request #69 from reborn2266/fix_mmleak fix memory leak in dlsym()
diff --git a/dlfcn.c b/dlfcn.c
index 2497a39..01e878b 100644
--- a/dlfcn.c
+++ b/dlfcn.c
@@ -432,7 +432,10 @@ void *dlsym( void *handle, const char *name )
continue;
symbol = GetProcAddress( modules[i], name );
if( symbol != NULL )
+ {
+ free( modules );
goto end;
+ }
}
}