An ear infection leads to the release of pus, which may often have a foul odor due to the presence of microorganisms in it.