Remove explicit calls to free() and malloc().