Citation? That doesn't seem right, based on my anecdotal knowledge that restaurants take care to throw leftovers into a garbage bin rather than leave them out somewhere where someone could eat them and expose the business to liability.
I looked up this claim myself. In 1996, President Clinton signed the Good Samaritan Food Donation Act into law to limit liability for those who donate food. [1] The majority of restaurants still discard leftover food due to concerns over liability, though. [2] Clearly, liability was a real issue at some point in the past. I don't know enough about the current law to know how easy it is to take advantage of the new protections; I can understand why people are still concerned.
In summary, liability issues vary by country and are not clear-cut. As an analogy for this open-source situation, they don't clarify matters.
[1] https://digitalcommons.law.seattleu.edu/cgi/viewcontent.cgi?...
[2] https://www.huffingtonpost.com/entry/restaurants-that-dont-d...