Revert "Fix another possible memory leak"

This reverts commit f88c7421a498bdc267848e1569e966838769235e.