diff --git a/selfdrive/loggerd/loggerd.cc b/selfdrive/loggerd/loggerd.cc index ed5a34100..eb4148523 100644 --- a/selfdrive/loggerd/loggerd.cc +++ b/selfdrive/loggerd/loggerd.cc @@ -168,6 +168,7 @@ void encoder_thread(bool is_streaming, bool raw_clips, bool front) { VIPCBuf* buf = visionstream_get(&stream, &extra); if (buf == NULL) { LOG("visionstream get failed"); + visionstream_destroy(&stream); break; } diff --git a/selfdrive/modeld/dmonitoringmodeld.cc b/selfdrive/modeld/dmonitoringmodeld.cc index ba69e5f53..d17247f9e 100644 --- a/selfdrive/modeld/dmonitoringmodeld.cc +++ b/selfdrive/modeld/dmonitoringmodeld.cc @@ -55,6 +55,7 @@ int main(int argc, char **argv) { buf = visionstream_get(&stream, &extra); if (buf == NULL) { printf("visionstream get failed\n"); + visionstream_destroy(&stream); break; } //printf("frame_id: %d %dx%d\n", extra.frame_id, buf_info.width, buf_info.height);