Fix leaking memory cards.