linux/swconfig_get_attr: fix leak of msg in case of error