Revert "Fix memory leak"

This reverts commit fadcad406cc14092c3089ea5539dc41ec1221b49.
Fix memory leak