I checked the SDL 1.2.15 source code to see what actually happens when called SDL_Quit. Gemini14's answer is correct: SDL_Quitonly the main SDL_Surface returned will be freed SDL_SetVideoMode.
That's why:
SDLQuitcalls SDLQuitSubSystemto exit each subsystemSDLQuitSubSystem will call several functions to exit the subsystemSDL_VideoQuit , current_video NULL.current_video NULL, .SDL_FreeSurface SDL_ShadowSurface SDL_VideoSurfaceSDL_ShadowSurface SDL_VideoSurface SDL_SetVideoMode
SDL_FreeSurface SDL_Surface, SDL_SetVideoMode, , SDL_Surface SDL_Quit SDL_FreeSurface.
, , SDL_Surface , SDL_Quit.