Properly free drm plane during creation of sprites
authorChris Michael <cp.michael@samsung.com>
Thu, 2 Jan 2014 11:39:40 +0000 (11:39 +0000)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 2 Jan 2014 23:22:59 +0000 (15:22 -0800)
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@samsung.com>
src/compositor-drm.c

index d637e75..75644e1 100644 (file)
@@ -2107,7 +2107,7 @@ create_sprites(struct drm_compositor *ec)
                if (!sprite) {
                        weston_log("%s: out of memory\n",
                                __func__);
-                       free(plane);
+                       drmModeFreePlane(plane);
                        continue;
                }