]> Pileus Git - ~andy/gtk/commitdiff
Fix memory leak in case of mismatched property type.
authorOwen Taylor <otaylor@redhat.com>
Fri, 27 Feb 2004 00:52:45 +0000 (00:52 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Fri, 27 Feb 2004 00:52:45 +0000 (00:52 +0000)
Thu Feb 26 19:48:39 2004  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/xsettings-client.c (read_settings): Fix memory leak
        in case of mismatched property type.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/x11/xsettings-client.c

index 12ffe643cc33013dbd930ce9cd56bdaa64eaa8d1..cc75a05cc162e011b7dc795a073605eadbafb0bb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Feb 26 19:48:39 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/xsettings-client.c (read_settings): Fix memory leak
+       in case of mismatched property type.
+
 Thu Feb 26 18:25:57 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkfilechooser.h (GtkFileChooserAction): Add two more folder
index 12ffe643cc33013dbd930ce9cd56bdaa64eaa8d1..cc75a05cc162e011b7dc795a073605eadbafb0bb 100644 (file)
@@ -1,3 +1,8 @@
+Thu Feb 26 19:48:39 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/xsettings-client.c (read_settings): Fix memory leak
+       in case of mismatched property type.
+
 Thu Feb 26 18:25:57 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkfilechooser.h (GtkFileChooserAction): Add two more folder
index 12ffe643cc33013dbd930ce9cd56bdaa64eaa8d1..cc75a05cc162e011b7dc795a073605eadbafb0bb 100644 (file)
@@ -1,3 +1,8 @@
+Thu Feb 26 19:48:39 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/xsettings-client.c (read_settings): Fix memory leak
+       in case of mismatched property type.
+
 Thu Feb 26 18:25:57 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkfilechooser.h (GtkFileChooserAction): Add two more folder
index 12ffe643cc33013dbd930ce9cd56bdaa64eaa8d1..cc75a05cc162e011b7dc795a073605eadbafb0bb 100644 (file)
@@ -1,3 +1,8 @@
+Thu Feb 26 19:48:39 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/xsettings-client.c (read_settings): Fix memory leak
+       in case of mismatched property type.
+
 Thu Feb 26 18:25:57 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkfilechooser.h (GtkFileChooserAction): Add two more folder
index 12ffe643cc33013dbd930ce9cd56bdaa64eaa8d1..cc75a05cc162e011b7dc795a073605eadbafb0bb 100644 (file)
@@ -1,3 +1,8 @@
+Thu Feb 26 19:48:39 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/xsettings-client.c (read_settings): Fix memory leak
+       in case of mismatched property type.
+
 Thu Feb 26 18:25:57 2004  Jonathan Blandford  <jrb@gnome.org>
 
        * gtk/gtkfilechooser.h (GtkFileChooserAction): Add two more folder
index 891d477e767223c0bf9f1778344c780ede7cab29..8b81b45242c999ad9fe4bb6f9ea70b6e44320b42 100644 (file)
@@ -383,9 +383,13 @@ read_settings (XSettingsClient *client)
                                   &type, &format, &n_items, &bytes_after, &data);
       XSetErrorHandler (old_handler);
       
-      if (result == Success && type == client->xsettings_atom)
+      if (result == Success && type != None)
        {
-         if (format != 8)
+         if (type != client->xsettings_atom)
+           {
+             fprintf (stderr, "Invalid type for XSETTINGS property");
+           }
+         eles if (format != 8)
            {
              fprintf (stderr, "Invalid format for XSETTINGS property %d", format);
            }