How To Comfort A Friend

If you are that friend who always listens to other people pour their hearts out (and we all are that friend in one situation or another), how do you comfort without siding with the person’s mistakes he/she is not willing to admit with uncompromising Compassion?