SDL_FreeSurface vs free

You have to use the proper analog, otherwise it's undefined behaviour.