Skip to content

Commit 3ca6151

Browse files
committed
Below are the issues fixed:
Resolved Resource Leak Test done: Successfully verified Tracked-On : OAM-122341 Signed-off-by: Sapna <[email protected]>
1 parent 46c9a1d commit 3ca6151

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hwc3-server/default/impl/HwcLoader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ hwc2_device_t* HwcLoader::openDeviceWithAdapter(const hw_module_t* module, bool*
5555
return adaptGrallocModule(module);
5656
}
5757

58-
hw_device_t* device;
58+
hw_device_t* device = nullptr;
5959
int error = module->methods->open(module, HWC_HARDWARE_COMPOSER, &device);
6060
if (error) {
6161
ALOGE("failed to open hwcomposer device: %s", strerror(-error));
@@ -74,7 +74,7 @@ hwc2_device_t* HwcLoader::openDeviceWithAdapter(const hw_module_t* module, bool*
7474
}
7575

7676
hwc2_device_t* HwcLoader::adaptGrallocModule(const hw_module_t* module) {
77-
framebuffer_device_t* device;
77+
framebuffer_device_t* device = nullptr;
7878
int error = framebuffer_open(module, &device);
7979
if (error) {
8080
ALOGE("failed to open framebuffer device: %s", strerror(-error));

0 commit comments

Comments
 (0)