libhardware: fix a use after free warning.
This fixes the warning that mModule is used after being freed. BUG: None Test: The warning is gone. Change-Id: I8d081b544f0bcd69559a10dd3e925ce5cf065c28
This commit is contained in:
parent
cfd950b679
commit
ce3cd0cf4a
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,6 @@ struct CameraModuleFixture {
|
|||
void TearDown() {
|
||||
TEST_EXTENSION_FORKING_TEAR_DOWN;
|
||||
|
||||
delete mModule;
|
||||
TearDownMixin();
|
||||
|
||||
/* important: device must be destructed before closing module,
|
||||
|
@ -85,6 +84,7 @@ struct CameraModuleFixture {
|
|||
ASSERT_EQ(0, HWModuleHelpers::closeModule(mModule->getDso()))
|
||||
<< "Failed to close camera HAL module";
|
||||
}
|
||||
delete mModule;
|
||||
}
|
||||
|
||||
void CreateCamera(int cameraID, /*out*/ sp<CameraDeviceBase> *device) {
|
||||
|
|
Loading…
Reference in a new issue