mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-20 16:20:09 +01:00
Fix use-after-free in pdf-features testcase.
This commit is contained in:
parent
20ef4ec460
commit
84192695f8
1 changed files with 2 additions and 1 deletions
|
|
@ -128,15 +128,16 @@ preamble (cairo_test_context_t *ctx)
|
||||||
|
|
||||||
cairo_destroy (cr);
|
cairo_destroy (cr);
|
||||||
cairo_surface_destroy (surface);
|
cairo_surface_destroy (surface);
|
||||||
free (filename);
|
|
||||||
|
|
||||||
if (status) {
|
if (status) {
|
||||||
cairo_test_log (ctx, "Failed to create pdf surface for file %s: %s\n",
|
cairo_test_log (ctx, "Failed to create pdf surface for file %s: %s\n",
|
||||||
filename, cairo_status_to_string (status));
|
filename, cairo_status_to_string (status));
|
||||||
|
free (filename);
|
||||||
return CAIRO_TEST_FAILURE;
|
return CAIRO_TEST_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf ("pdf-features: Please check %s to ensure it looks/prints correctly.\n", filename);
|
printf ("pdf-features: Please check %s to ensure it looks/prints correctly.\n", filename);
|
||||||
|
free (filename);
|
||||||
return CAIRO_TEST_SUCCESS;
|
return CAIRO_TEST_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue