[test] Fixup potential use of uninitialized test_image.

In the churn of reordering the tests, some of the error paths were left
unaltered - causing potential invalid dereferences.
This commit is contained in:
Chris Wilson 2008-09-15 15:52:27 +01:00
parent 34f2506432
commit 77b43da99f

View file

@ -737,7 +737,6 @@ cairo_test_for_target (cairo_test_context_t *ctx,
if (cairo_test_files_equal (test_filename, pass_filename)) {
/* identical output as last known PASS */
cairo_test_log (ctx, "Vector surface matches last pass.\n");
cairo_surface_destroy (test_image);
ret = CAIRO_TEST_SUCCESS;
goto UNWIND_CAIRO;
}
@ -745,7 +744,6 @@ cairo_test_for_target (cairo_test_context_t *ctx,
/* identical output as last known FAIL, fail */
cairo_test_log (ctx, "Vector surface matches last fail.\n");
have_result = TRUE; /* presume these were kept around as well */
cairo_surface_destroy (test_image);
ret = CAIRO_TEST_FAILURE;
goto UNWIND_CAIRO;
}