pull one's chestnuts out of the fire
To do someone else a great favor which they don't really deserve, doing oneself a disfavor in the process.
Small countries often have to pull the chestnuts out of the fire for their more powerful neighbors.
No categories:
Source: A Dictionary of American Idioms