Merge pull request #58 from pali/master Correctly process malloc() error in dlsym()
diff --git a/dlfcn.c b/dlfcn.c
index ec60423..ce06d93 100644
--- a/dlfcn.c
+++ b/dlfcn.c
@@ -439,6 +439,11 @@ void *dlsym( void *handle, const char *name )
}
free( modules );
}
+ else
+ {
+ SetLastError( ERROR_NOT_ENOUGH_MEMORY );
+ goto end;
+ }
}
}