swconfig: release switch in error path of swconfig_get_attr