Good news! There is nothing to be concerned about regarding liability of donating food. To encourage more donations, Public Law 104-210, more commonly referred to as the Good Samaritan Food Donation Act, was passed in October 1996.
This act protects companies and organizations from criminal and civil liabilities when you donate to a non-profit organizations such as food banks, food pantries and shelters as long as the food is suitable for consumption, meaning it’s quality, age, packaging, and condition is suitable to be consumed by those in need. In turn, the non-profit is also free from any criminal or civil liability when the food is donated, knowing that it was wholesale and in a suitable condition to be consumed by those in need.
You can read the bill itself from the U.S. Government Publishing Office by clicking here.