settings_data: Correctly handle realloc fail case