Citigroup has agreed to pay $395 million to Freddie Mac to settle claims of potential flaws in mortgages it sold…