        VIPCBufExtra extra;
        buf = visionstream_get(&stream, &extra);
        if (buf == NULL) {
          LOGW("visionstream get failed");
          visionstream_destroy(&stream);
          break;
        }
  
        pthread_mutex_lock(&transform_lock);
        mat3 transform = cur_transform;
 
</s> remove         visionstream_destroy(&stream);
 </s> add  </s> remove 
 </s> add     visionstream_destroy(&stream); </s> remove   visionstream_destroy(&stream);

 </s> add  </s> remove   visionstream_destroy(&stream);

 </s> add 
        VIPCBufExtra extra;
        buf = visionstream_get(&stream, &extra);
        if (buf == NULL) {
          LOGW("visionstream get failed");

          break;
        }
  
        pthread_mutex_lock(&transform_lock);
        mat3 transform = cur_transform;
keep keep keep keep replace keep keep keep keep keep
 fix bug that visionstream_destroy may be called twice (#1999) 
selfdrive/modeld/modeld.cc