Hi,

attached patch fixes the clean up path of the surface core, which is
necessary if pool initialization fails and one wants to register further
pools.

Cheers,
Andre'

>From e26277c74b939875ae7b14aa4f5b635a07de0552 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Andr=C3=A9=20Draszik?= <andre.dras...@st.com>
Date: Sat, 28 Feb 2009 01:59:21 +0000
Subject: [PATCH] [surface pools] add missing cleanup of local pool database
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

we need to clean up a bit more in case surface pool initialization
failed, so that further pools can still be registered

Signed-off-by: André Draszik <andre.dras...@st.com>
---
 src/core/surface_pool.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/core/surface_pool.c b/src/core/surface_pool.c
index 9fcae14..dec0eb9 100644
--- a/src/core/surface_pool.c
+++ b/src/core/surface_pool.c
@@ -153,6 +153,8 @@ dfb_surface_pool_initialize( CoreDFB                 *core,
 
      ret = init_pool( core, pool, funcs );
      if (ret) {
+          pool_funcs[pool->pool_id] = NULL;
+          pool_array[pool->pool_id] = NULL;
           pool_count--;
           D_MAGIC_CLEAR( pool );
           SHFREE( shmpool, pool );
-- 
1.5.6.3

_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to