Saving someone’s skin.

This idiom or expression has to do with:

Saving their job, life, reputation, etc.
Saving them from difficulty, exposure, embarrassment, etc.

A. You know, when you took the responsibility for wrecking the car, you really saved my skin!
B. It’s okay. That’s what friends are for!

Also:
Saving someone’s hide, or neck, or bacon.