This is something I ask prospective employers during the interview process. If they have a lein on my free time, then I ask for an additional 20%, minimum, and explain to them why. I am willing to negotiate, but if they aren't, then I have to tell them no thanks, it's a matter of trust. The reason is, I used to work for a place that had such a rule. One time, they asked me to help with a problem, but I said that I couldn't. I'd learned the solution at a previous job, and my former employers who own the solution would want the current/grasping company to pay for it. This did not get a smile from teacher.
Luckily, I now work in a state that is fairly labor friendly, as opposed to Labor friendly. It's a right-to-work state, so unions cannot keep people out of a place if a business wants to hire them. (Well, except the teacher's union.) Likewise, intellectual property rights are fairly well-defended in the laws here, so we don't have to deal with it too often. But still, I keep my eyes peeled.
One thing I've found helpful is the nuisance factor. If you follow management directives to the letter, or rather to the sublime/ridiculous, things back off. Just go in one day and say "Mr Marketing VP, I just had a brilliant idea that is now the company's: meat-flavored ice cream." Do that enough and you're left alone.
As God is my witness, I thought turkeys could fly.