Yeah, you don't want to hire a dud.
In my case, my manager was particularly fearful about losing me. When I told him that I was entertaining other gigs he plainly told me that "I will black mark you across the industry if you leave." I was young, naive and scared, so I took it seriously (luckily things have improved vastly since). I now know that I would not put him on my CV; instead the myriads of other employees who have interacted with me. This is why those laws are in-place: preventing hostage situations.
We're talking about an ex-employee here. It's not like giving negative feedback will really help the company. It can only hurt them.
Fortunately, lack of good information strongly implies negative information that is being withheld, so it's all fine.