There is two ways this could put your friend’s job at risk.
If this person provides information to the company which contradicts the reasons your friend gave his previous job ending it could set off a red flag in the company.
If the person provides the company damming information about your friend’s performance while at his previous job then the company may think twice about hiring him.
There isn’t much you friend can do. Any attempt at damage limitation would look very odd to the hiring company.
This situation is not unusual. HR and hiring managers often ask around their network of contacts about people they may hire. In this case you just happen to know the name of someone they may talk to. This is why you should always be honest when interviewing and do you best not to give people reasons to say bad about you in the future.