time we can't find old device to be replaced,then this can cause crash. So we need to change the way to malloc the new device or replace the old in the list.