Those who have signed contracts which even MENTION code contributions should carefully audit all their contributions to anything, no matter when, where or how those contributions take place. It's quite easy to know if you are writing code and distributing it or not.
And those who publish code under an open-source license better have permission from the entity that OWNS that code (doesn't mean the same entity that wrote it!) or they will be in serious trouble and cause trouble for others. There is no distinction in law between distributing GPL code that your employer claims to own and didn't give you permission to GPL, and someone who takes an internal company project - say, their latest proprietary software - and makes it public on the web for people to download and even encourages them to download it with a "fake" license agreement. Both are the same legal incident and just as likely to end up with fines, sackings, jail or whatever is deemed appropriate in your jurisdiction - so consider writing GPL code on company time, or after having signed a company contract about your code contributions, exactly the same as just giving away Microsoft Office to newsgroups if you worked at Microsoft. Though you *might* be able to obtain permission from companies to do that (lots of companies give things away, from Serif giving away their DTP software for years, to other companies giving away their ancient versions, to companies - yes, letting you give away their original source code, like Quake) the two things are viewed as essentially the same act.
This isn't anything "new" or exciting here. If you have signed a contract regarding code that you write, then it's up to YOU to enforce that contract to the best of your ability, which includes CHECKING what you are doing at all stages and not just assuming that your (possibly-soon-to-be-ex-)employer will always allow it.
In the same way, if you sign a contract that says that the furniture in your office is the company's, you better not have a yard sale or giveaway from your office when you leave without checking with someone in authority on that contract first.
The biggest problem with mentioning open-source is that everyone assumes that somehow the law applies differently to it than everything else. Companies and end-users assume that "Free" means they can do what they like with it, and some coders assume that they are somehow exempt from copyright law because of it or don't need to audit their contributions. That's NOT how it works. Open-source code is a property like any other - and needs appropriate permission to do most things on it. The contracts/licenses may give you that permission implicitly or explicitly or not at all, but it is that permission that is still required.