It's better to be safe than sorry, so throw out any canned food with mold. Moldy food can be bad for your health if you eat it.