]> Pileus Git - ~andy/gtk/commitdiff
Free data returned from XGetWindowProperty.
authorMatthias Clasen <mclasen@redhat.com>
Fri, 19 Aug 2005 05:46:06 +0000 (05:46 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 19 Aug 2005 05:46:06 +0000 (05:46 +0000)
2005-08-19  Matthias Clasen  <mclasen@redhat.com>

* gdk/x11/gdkdnd-x11.c (_gdk_drag_get_protocol_for_display)
(xdnd_read_actions, get_client_window_at_coords_recurse):
Free data returned from XGetWindowProperty.

* gdk/x11/gdkevents-x11.c (fetch_net_wm_check_window)
Free data returned from XGetWindowProperty.  (313867, Kjartan
Maraas)

* gdk/x11/gdkdnd-x11.c (get_client_window_at_coords_recurse): Free
children in all cases.  (#313862, Kjartan Maraas)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gdk/x11/gdkdnd-x11.c
gdk/x11/gdkevents-x11.c

index 3ee24dc4cad4a0cb9fbc668bdcf51bc6cec5752d..39aab3af06da5753e914626110a8092e825000a9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2005-08-19  Matthias Clasen  <mclasen@redhat.com>
 
+       * gdk/x11/gdkdnd-x11.c (_gdk_drag_get_protocol_for_display) 
+       (xdnd_read_actions, get_client_window_at_coords_recurse): 
+       Free data returned from XGetWindowProperty. 
+
+       * gdk/x11/gdkevents-x11.c (fetch_net_wm_check_window) 
+       Free data returned from XGetWindowProperty.  (313867, Kjartan
+       Maraas)
+       
        * gdk/x11/gdkdnd-x11.c (get_client_window_at_coords_recurse): Free
        children in all cases.  (#313862, Kjartan Maraas)
 
index 3ee24dc4cad4a0cb9fbc668bdcf51bc6cec5752d..39aab3af06da5753e914626110a8092e825000a9 100644 (file)
@@ -1,5 +1,13 @@
 2005-08-19  Matthias Clasen  <mclasen@redhat.com>
 
+       * gdk/x11/gdkdnd-x11.c (_gdk_drag_get_protocol_for_display) 
+       (xdnd_read_actions, get_client_window_at_coords_recurse): 
+       Free data returned from XGetWindowProperty. 
+
+       * gdk/x11/gdkevents-x11.c (fetch_net_wm_check_window) 
+       Free data returned from XGetWindowProperty.  (313867, Kjartan
+       Maraas)
+       
        * gdk/x11/gdkdnd-x11.c (get_client_window_at_coords_recurse): Free
        children in all cases.  (#313862, Kjartan Maraas)
 
index 3ee24dc4cad4a0cb9fbc668bdcf51bc6cec5752d..39aab3af06da5753e914626110a8092e825000a9 100644 (file)
@@ -1,5 +1,13 @@
 2005-08-19  Matthias Clasen  <mclasen@redhat.com>
 
+       * gdk/x11/gdkdnd-x11.c (_gdk_drag_get_protocol_for_display) 
+       (xdnd_read_actions, get_client_window_at_coords_recurse): 
+       Free data returned from XGetWindowProperty. 
+
+       * gdk/x11/gdkevents-x11.c (fetch_net_wm_check_window) 
+       Free data returned from XGetWindowProperty.  (313867, Kjartan
+       Maraas)
+       
        * gdk/x11/gdkdnd-x11.c (get_client_window_at_coords_recurse): Free
        children in all cases.  (#313862, Kjartan Maraas)
 
index 9dbb54f29a41a28605109715681e2c0477885a55..cca5cce85743a6de17de1e177289bb10f2e630c4 100644 (file)
@@ -2485,6 +2485,7 @@ xdnd_read_actions (GdkDragContext *context)
       
       gdk_error_trap_push ();
       
+      data = NULL;
       if (XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display),
                              GDK_DRAWABLE_XID (context->source_window),
                              gdk_x11_get_xatom_by_name_for_display (display, "XdndActionList"),
@@ -2520,8 +2521,10 @@ xdnd_read_actions (GdkDragContext *context)
            }
 #endif /* G_ENABLE_DEBUG */
          
-         XFree(atoms);
        }
+
+      if (data)
+       XFree (data);
       
       gdk_error_trap_pop ();
     }
@@ -2739,6 +2742,10 @@ xdnd_enter_filter (GdkXEvent *xev,
       if (gdk_error_trap_pop () || (format != 32) || (type != XA_ATOM))
        {
          g_object_unref (new_context);
+
+         if (data)
+           XFree (data);
+
          return GDK_FILTER_REMOVE;
        }
 
@@ -3086,7 +3093,10 @@ _gdk_drag_get_protocol_for_display (GdkDisplay      *display,
                                  0, 0, False, AnyPropertyType,
                                  &type, &format, &nitems, &data) &&
              type != None)
-           rootwin = TRUE;
+           {
+             XFree (data);
+             rootwin = TRUE;
+           }
        }
 #endif      
 
index 63a22cbd3644d88e2336420528290fe0311d4f72..0a273a4b6bf9385545aa8de381ab8b9b926d76c3 100644 (file)
@@ -2555,13 +2555,18 @@ fetch_net_wm_check_window (GdkScreen *screen)
   if (screen_x11->wmspec_check_window != None)
     return; /* already have it */
   
+  data = NULL;
   XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), screen_x11->xroot_window,
                      gdk_x11_get_xatom_by_name_for_display (display, "_NET_SUPPORTING_WM_CHECK"),
                      0, G_MAXLONG, False, XA_WINDOW, &type, &format, 
                      &n_items, &bytes_after, &data);
   
   if (type != XA_WINDOW)
-    return;
+    {
+      if (data)
+        XFree (data);
+      return;
+    }
 
   xwindow = (Window *)data;
 
@@ -2574,14 +2579,14 @@ fetch_net_wm_check_window (GdkScreen *screen)
   if (gdk_error_trap_pop () == Success)
     {
       screen_x11->wmspec_check_window = *xwindow;
-      XFree (xwindow);
-      
       screen_x11->need_refetch_net_supported = TRUE;
       screen_x11->need_refetch_wm_name = TRUE;
       
       /* Careful, reentrancy */
       _gdk_x11_screen_window_manager_changed (GDK_SCREEN (screen_x11));
     }
+
+  XFree (xwindow);    
 }
 
 /**