[PATCH 25/40] qemuProcessUpdateDevices: Refactor cleanup and memory handling