Foam in a fluid like you are describing is basically just an idicator that there is indeed a leak as you mentioned or at best air in the system. Seeing as you spoke like you are aware of the leak... its not just air in the system and the leak needs to be fixed. If you let it go and lose more fluid and keep running the air through the system then THAT can result in a burnt up pump.
I suggest tracing down the leak, fixing it, and draining all fluid and pulling a vacuum on the system with a MityVac or something similar to ensure all the air is out of the system...then replace with clean fluid. Otherwise you run the risk of getting a whining sound in your pump and burning it up, costing a good bit more that an easy line fix if your leak is along that lines. A hand pump vacuum puller doesn't run you too much and are pretty handy to have around.
Hope this helps!
-beegle55