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)();
|
(*livoxProto1.livoxProto1_exit)();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (livoxProto1.dlopenHandle)
|
livoxProto1.dlopenHandle.reset(nullptr);
|
||||||
{
|
|
||||||
dlclose(livoxProto1.dlopenHandle.get());
|
|
||||||
livoxProto1.dlopenHandle.reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
livoxProto1 = LivoxProto1DllState();
|
livoxProto1 = LivoxProto1DllState();
|
||||||
return 0; // Success
|
return 0; // Success
|
||||||
|
|||||||
Reference in New Issue
Block a user