Fixed free problem in sprite.cpp.