[PATCH] cursor: free the array from which images are linked

Bryce Harrington bryce at osg.samsung.com
Wed Mar 18 16:06:10 PDT 2015


On Wed, Mar 18, 2015 at 12:49:06PM +0100, Emilio Pozuelo Monfort wrote:
> On 18/03/15 01:53, Emmanuel Gil Peyrot wrote:
> >---
> >  cursor/wayland-cursor.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> >diff --git a/cursor/wayland-cursor.c b/cursor/wayland-cursor.c
> >index 1a5393a..410a0d4 100644
> >--- a/cursor/wayland-cursor.c
> >+++ b/cursor/wayland-cursor.c
> >@@ -190,6 +190,7 @@ wl_cursor_destroy(struct wl_cursor *cursor)
> >  	for (i = 0; i < cursor->image_count; i++)
> >  		wl_cursor_image_destroy(cursor->images[i]);
> >
> >+	free(cursor->images);

Yep, the for loop only frees the objects in the array, not the array
containing the pointers to those objects.

> >  	free(cursor->name);
> >  	free(cursor);
> >  }
> >
> 
> Looks good.
> 
> Reviewed-by: Emilio Pozuelo Monfort <emilio.pozuelo at collabora.co.uk>

Thanks, pushed:
   be47969..c770b84  master -> master

> Cheers,
> Emilio
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list