camerad: fix VisionBuf freeing (#34264)

Co-authored-by: Comma Device <device@comma.ai>
pull/34266/head
Adeeb Shihadeh 4 months ago committed by GitHub
parent b2930682ff
commit a82116ac46
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      system/camerad/cameras/camera_common.cc

@ -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;
}

Loading…
Cancel
Save