[gtk+/native-layout] Fix a memory leak in gdk_display_open in the directfb backend
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/native-layout] Fix a memory leak in gdk_display_open in the directfb backend
- Date: Sun, 4 Apr 2010 02:31:03 +0000 (UTC)
commit d1babc777533ee36a96f6dae3862711431bedc87
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Feb 23 13:06:44 2010 -0500
Fix a memory leak in gdk_display_open in the directfb backend
Patch by Andre Draszik, bug 609172
gdk/directfb/gdkdisplay-directfb.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/gdk/directfb/gdkdisplay-directfb.c b/gdk/directfb/gdkdisplay-directfb.c
index 423e15d..f5a9d6a 100644
--- a/gdk/directfb/gdkdisplay-directfb.c
+++ b/gdk/directfb/gdkdisplay-directfb.c
@@ -93,17 +93,19 @@ 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);
- return NULL;
- }
+ directfb->Release (directfb);
+ _gdk_display->directfb = NULL;
+ return NULL;
+ }
_gdk_display->layer=layer;
_gdk_display->keyboard=keyboard;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]