Commit a4d18cb1 by Nicolas Capens Committed by Nicolas Capens

Fix closing unopened shared libraries.

BUG=18208440 Change-Id: I619317803fcc13fffc8a2df427c8d504a86cdcba Reviewed-on: https://swiftshader-review.googlesource.com/1460Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 43989208
...@@ -84,10 +84,13 @@ void *loadLibrary(const char *(&names)[n]) ...@@ -84,10 +84,13 @@ void *loadLibrary(const char *(&names)[n])
return 0; return 0;
} }
inline void freeLibrary(void *library) inline void freeLibrary(void *library)
{ {
dlclose(library); if(library)
} {
dlclose(library);
}
}
inline void *getProcAddress(void *library, const char *name) inline void *getProcAddress(void *library, const char *name)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment