image: fix a memory leak in get shadow surface