Fix 2 memory leaks.

(Thanks to Brent Cook)

OK from tedu@