Fix CID-5893 (resource leak):
* close the dlopen()-ed image if the locale backend could not be created git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39950 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
4167bb128b
commit
9201344705
@ -32,8 +32,10 @@ LoadBackend()
|
||||
typedef LocaleBackend* (*symbolType)();
|
||||
symbolType createInstanceFunc
|
||||
= (symbolType)dlsym(imageHandle, "CreateInstance");
|
||||
if (createInstanceFunc == NULL)
|
||||
if (createInstanceFunc == NULL) {
|
||||
dlclose(imageHandle);
|
||||
return;
|
||||
}
|
||||
|
||||
gLocaleBackend = createInstanceFunc();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user