[Issue#] LINUXWRT-234
[Bug] Dereference null return value
[Cause] N/A
[Solution] Remove issues
[Verification] Build wrt-installer repository
run: wrt-installer -p
additionally you can run wrt-installer-tests-general --output=text --regexp='pluginFilesAdded'
to run tests you should build repository with flag --define="WITH_TESTS ON"
Change-Id: I62db6e501f17170b9f2a799fa596971212d47843
void *dlHandle = dlopen(filename.c_str(), RTLD_LAZY);
if (dlHandle == NULL) {
+ const char* error = (const char*)dlerror();
LogError(
"Failed to load plugin: " << filename <<
- ". Reason: " << (dlerror() != NULL ? dlerror() : "unknown"));
+ ". Reason: " << (error != NULL ? error : "unknown"));
ThrowMsg(Exceptions::PluginLibraryError, "Library error");
}