Fix a memory leak in gdk_display_open in the directfb backend

Patch by Andre Draszik, bug 609172
This commit is contained in:
Matthias Clasen 2010-02-23 13:06:44 -05:00
parent 2dc9298b41
commit 7f483dbd7b

View File

@ -93,15 +93,17 @@ GdkDisplay * gdk_display_open (const gchar *display_name)
{
DirectFBError ("gdk_display_open: GetDisplayLayer", ret);
directfb->Release (directfb);
directfb = NULL;
_gdk_display->directfb = NULL;
return NULL;
}
ret=directfb->GetInputDevice (directfb, DIDID_KEYBOARD, &keyboard);
if (ret != DFB_OK){
ret = directfb->GetInputDevice (directfb, DIDID_KEYBOARD, &keyboard);
if (ret != DFB_OK)
{
DirectFBError ("gdk_display_open: GetInputDevice", ret);
directfb->Release (directfb);
_gdk_display->directfb = NULL;
return NULL;
}