Skip to content

Commit

Permalink
camerad: fix VisionBuf freeing (#34264)
Browse files Browse the repository at this point in the history
Co-authored-by: Comma Device <[email protected]>
  • Loading branch information
adeebshihadeh and Comma Device authored Dec 16, 2024
1 parent b293068 commit a82116a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions system/camerad/cameras/camera_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ void CameraBuf::init(cl_device_id device_id, cl_context context, SpectraCamera *
}

CameraBuf::~CameraBuf() {
for (int i = 0; i < frame_buf_count; i++) {
camera_bufs_raw[i].free();
if (camera_bufs_raw != nullptr) {
for (int i = 0; i < frame_buf_count; i++) {
camera_bufs_raw[i].free();
}
}
if (imgproc) delete imgproc;
}
Expand Down

0 comments on commit a82116a

Please sign in to comment.