[PATCH] Properly free drm plane in create_sprites

Kristian Høgsberg hoegsberg at gmail.com
Thu Jan 2 15:23:23 PST 2014


On Thu, Jan 02, 2014 at 11:43:59AM +0000, Christopher Michael wrote:
> From 11680caa37e27b5f0273f18395fc46975c91b599 Mon Sep 17 00:00:00 2001
> From: Chris Michael <cp.michael at samsung.com>
> Date: Thu, 2 Jan 2014 11:39:40 +0000
> Subject: [PATCH] Properly free drm plane during creation of sprites
> 
> If we fail to allocate space for a new drm_sprite, then we should
> properly call drmModeFreePlane (not free) to release the drm plane.
> 
> Signed-off-by: Chris Michael <cp.michael at samsung.com>

Yes, that's better.  Thanks, applied.

Kristian

> ---
>  src/compositor-drm.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/compositor-drm.c b/src/compositor-drm.c
> index 4f015d1..21d9194 100644
> --- a/src/compositor-drm.c
> +++ b/src/compositor-drm.c
> @@ -2050,7 +2050,7 @@ create_sprites(struct drm_compositor *ec)
>  		if (!sprite) {
>  			weston_log("%s: out of memory\n",
>  				__func__);
> -			free(plane);
> +			drmModeFreePlane(plane);
>  			continue;
>  		}
>  
> -- 
> 1.7.9.5
> 



More information about the wayland-devel mailing list