The visa is still valid even if the passport expires or is cancelled. As someone already noted, just carry both passports. But be careful if you submit your passport for cancellation when you apply for a new one; if your local passport office stamps all the pages of the old passport with ‘Cancelled’ or the equivalent, including the US visa, then the visa can’t be used.