Fix potential memory leak in dev_set_alias()