Commit fc85a9b1 authored by Paul Kocialkowski's avatar Paul Kocialkowski

lib/igt_chamelium: Fixup resources liberation in comparison helpers

This fixes a bunch of occurrences of memory not being properly
liberated after its use in helpers revolving around frame/CRC
comparison.
Signed-off-by: Paul Kocialkowski's avatarPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Lyude Paul's avatarLyude Paul <lyude@redhat.com>
Reviewed-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
parent ad4b1a45
......@@ -1060,9 +1060,9 @@ void chamelium_assert_crc_eq_or_dump(struct chamelium *chamelium,
free(reference_suffix);
free(capture_suffix);
chamelium_destroy_frame_dump(frame);
cairo_surface_destroy(reference);
cairo_surface_destroy(capture);
chamelium_destroy_frame_dump(frame);
}
igt_assert(eq);
......@@ -1120,11 +1120,14 @@ void chamelium_assert_analog_frame_match_or_dump(struct chamelium *chamelium,
free(reference_suffix);
free(capture_suffix);
free(reference_crc);
free(capture_crc);
}
cairo_surface_destroy(capture);
igt_assert(match);
cairo_surface_destroy(reference);
cairo_surface_destroy(capture);
}
......@@ -1323,6 +1326,8 @@ igt_crc_t *chamelium_calculate_fb_crc(int fd, struct igt_fb *fb)
chamelium_do_calculate_fb_crc(fb_surface, ret);
cairo_surface_destroy(fb_surface);
return ret;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment