mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-22 22:00:12 +01:00
Fix leaks in failure paths in pixman gradient creation
This commit is contained in:
parent
6ff531c182
commit
db06681b48
1 changed files with 2 additions and 0 deletions
|
|
@ -233,6 +233,7 @@ pixman_image_create_linear_gradient (const pixman_linear_gradient_t *gradient,
|
|||
|
||||
if (_pixman_init_gradient (&image->pSourcePict->gradient, stops, n_stops))
|
||||
{
|
||||
free (linear);
|
||||
free (image);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -288,6 +289,7 @@ pixman_image_create_radial_gradient (const pixman_radial_gradient_t *gradient,
|
|||
|
||||
if (_pixman_init_gradient (&image->pSourcePict->gradient, stops, n_stops))
|
||||
{
|
||||
free (radial);
|
||||
free (image);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue