      }
      visionbuf_free(&yuv_ion);
    }
  
    visionstream_destroy(&stream);
  
    model_free(&model);
  
    LOG("joining live_thread");
    err = pthread_join(live_thread_handle, NULL);
    assert(err == 0);
 
</s> remove 
 </s> add     visionstream_destroy(&stream); </s> remove   visionstream_destroy(&stream);

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


    model_free(&model);
  
    LOG("joining live_thread");
    err = pthread_join(live_thread_handle, NULL);
    assert(err == 0);
keep keep keep keep replace replace keep keep keep keep keep
 fix bug that visionstream_destroy may be called twice (#1999) 
selfdrive/modeld/modeld.cc