I'm going to tell a guy to stop dumping all his problems on my girlfriend
Why does this guy tell his problems to your gf?
Because she's usually the only one who'll listen to him.
Your girlfriend is helping this man with his troubles and so it really isn't fair for you to come in and tell either of them what to do. This is their business, and I think you should leave them alone.
I'm trying to be a good friend. I would expect them to do the same if I was in trouble.
That's a good thought that you had: if you had problems in your life, your girlfriend or your other friend would likely both be willing to listen and to help.  Your girlfriend is just trying to be helpful to this person, and as long as she doesn't mind, you should allow it to happen.  She will still have plenty of time for you.