Use this function to free an RGB surface.
void SDL_FreeSurface(SDL_Surface* surface)
the SDL_Surface structure to free
You can add your code example here
If the surface was created using SDL_CreateRGBSurfaceFrom() then the pixel data is not freed.
It is safe to pass NULL to this function.