fixed memory leaks in floodfill tests
fixed memory leaks in floodfill tests

(cherry picked from commit d1b882ddcf54e52ac70bb17540c84c4a93553add)

opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv