Skip to content

Commit

Permalink
Relese the ivshm node
Browse files Browse the repository at this point in the history
Tracked-On: OAM-124746
Signed-off-by: HeYue <yue.he@intel.com>
  • Loading branch information
yhe39 authored and sysopenci committed Sep 15, 2024
1 parent 7d29ab0 commit 060e9fb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cros_gralloc/cros_gralloc_driver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@ int32_t cros_gralloc_driver::reload()
if (!drv_ivshmem_) {
drv_loge("Failed to create driver\n");
close(fd);
continue;;
continue;
}

if (drv_init(drv_ivshmem_, gpu_grp_type_)) {
drv_loge("Failed to init driver\n");
DRV_DESTROY(drv_ivshmem_)
continue;;
continue;
}
if (drv_virtgpu_is_ivshm(drv_ivshmem_)) {
drv_logi("New added node is virtio-ivishmem node");
Expand Down Expand Up @@ -367,6 +367,8 @@ cros_gralloc_driver::~cros_gralloc_driver()
if (drv_kms_ != drv_render_)
DRV_DESTROY(drv_kms_)
DRV_DESTROY(drv_render_)
if (drv_ivshmem_)
DRV_DESTROY(drv_ivshmem_)
}

bool cros_gralloc_driver::is_initialized()
Expand Down

0 comments on commit 060e9fb

Please sign in to comment.