[Pixman] [PATCH] Plug leak in the alphamap test.
Soeren Sandmann
sandmann at daimi.au.dk
Fri Oct 8 04:53:34 PDT 2010
Søren Sandmann <sandmann at daimi.au.dk> writes:
> static pixman_image_t *
> make_image (pixman_format_code_t format)
> {
> uint32_t *bits;
> uint8_t bpp = PIXMAN_FORMAT_BPP (format) / 8;
> + pixman_image_t *image;
>
> bits = (uint32_t *)make_random_bytes (WIDTH * HEIGHT * bpp);
>
> - return pixman_image_create_bits (format, WIDTH, HEIGHT, bits, WIDTH * bpp);
> + image = pixman_image_create_bits (format, WIDTH, HEIGHT, bits, WIDTH * bpp);
> +
> + if (image && bits)
> + pixman_image_set_destroy_function (image, on_destroy, NULL);
> }
I need a "return image" there, of course. Somehow this didn't actually
cause the test to fail. Maybe image was in eax or something.
Soren
More information about the Pixman
mailing list