Hi All,

A minor patch for the drm compositor.

If we fail to allocate space for a new Sprite structure, then we should be calling drmModeFreePlane (instead of the current call to free()) in order to cleanup.

Cheers,
Chris Michael
>From 11680caa37e27b5f0273f18395fc46975c91b599 Mon Sep 17 00:00:00 2001
From: Chris Michael <[email protected]>
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 <[email protected]>
---
 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

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to