Revert "Not free external allocated memory blocks."

This reverts commit e033362cb516ad10b470a682397cda7073213cf1.