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. 2
      system/camerad/cameras/camera_common.cc

@ -93,9 +93,11 @@ void CameraBuf::init(cl_device_id device_id, cl_context context, SpectraCamera *
} }
CameraBuf::~CameraBuf() { CameraBuf::~CameraBuf() {
if (camera_bufs_raw != nullptr) {
for (int i = 0; i < frame_buf_count; i++) { for (int i = 0; i < frame_buf_count; i++) {
camera_bufs_raw[i].free(); camera_bufs_raw[i].free();
} }
}
if (imgproc) delete imgproc; if (imgproc) delete imgproc;
} }

Loading…
Cancel
Save