It could be frustrating having to listen to a coworker's whining of how life has been unfair to him/her. It gets more annoying when they complain about your boss, especially when you like both your boss and coworker.
This puts your loyalty to test and you really don't want to throw one person under the bus.
Jessica Sager of The GrindStone lists three ways to deal with your co-worker without getting into trouble: