Prevent leaking if upg_version dies before returning