Most of the time, any fluid leaking out of an ear is ear wax.
A ruptured eardrum can cause a white, slightly bloody, or yellow discharge from the ear. Dry crusted material on a child's pillow is often a sign of a ruptured eardrum. The eardrum may also bleed.
Causes of a ruptured eardrum include:
Foreign object in the ear canal
Injury from a blow to the head, foreign object, very loud noises, or sudden pressure changes (such as in airplanes)
Inserting cotton-tipped swabs or other small objects into the ear
Middle ear infection