mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-13 02:46:23 +00:00
lib: NULLify ->cairo_surface once unmapped
Just a matter of not leaving dangling pointers around. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
This commit is contained in:
parent
4aadbc817b
commit
72357f3de0
@ -521,7 +521,9 @@ static cairo_format_t drm_format_to_cairo(uint32_t drm_format)
|
|||||||
static void destroy_cairo_surface__gtt(void *arg)
|
static void destroy_cairo_surface__gtt(void *arg)
|
||||||
{
|
{
|
||||||
struct igt_fb *fb = arg;
|
struct igt_fb *fb = arg;
|
||||||
|
|
||||||
munmap(cairo_image_surface_get_data(fb->cairo_surface), fb->size);
|
munmap(cairo_image_surface_get_data(fb->cairo_surface), fb->size);
|
||||||
|
fb->cairo_surface = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void create_cairo_surface__gtt(int fd, struct igt_fb *fb)
|
static void create_cairo_surface__gtt(int fd, struct igt_fb *fb)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user