livoxGen1: Use RAII to close dlopen handle
This commit is contained in:
@@ -497,11 +497,7 @@ extern "C" int livoxGen1_finalizeInd(void)
|
||||
(*livoxProto1.livoxProto1_exit)();
|
||||
}
|
||||
|
||||
if (livoxProto1.dlopenHandle)
|
||||
{
|
||||
dlclose(livoxProto1.dlopenHandle.get());
|
||||
livoxProto1.dlopenHandle.reset();
|
||||
}
|
||||
livoxProto1.dlopenHandle.reset(nullptr);
|
||||
|
||||
livoxProto1 = LivoxProto1DllState();
|
||||
return 0; // Success
|
||||
|
||||
Reference in New Issue
Block a user