I frequently do this with a friend. When he had problems with his work, or some issues with an in law I was one of the persons he often talked to. I've learned to try and identify what the other person needs/want in a conversation. Sometimes they just want others to listen to them vent, and sometimes they want some inputs. I think I've helped him with both and we are closer because of it.
It's good to know what approach to take as the wrong one can go bay, or at least inhibit progress. Well done.