Fix memory leak in case of mismatched property type.

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.
This commit is contained in:
Owen Taylor 2004-02-27 00:52:45 +00:00 committed by Owen Taylor
parent d40eda7e87
commit 4528eae1f3
6 changed files with 31 additions and 2 deletions

View 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

View 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

View 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

View 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

View 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

View 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);
}