Fix all known memory leaks.