Companies and individuals that donate food items are protected from liability by the Good Samaritan Act.

Emerson Good Samaritan Food Donation Act

PUBLIC LAW 104-210

An Act to encourage the donation of food and grocery products to nonprofit organizations for distribution to needy individuals by giving the Model Good Samaritan Food Donation Act the full force and effect of law.

Read the entire text here...