[gdm] g_array_free doesn't allow NULLs
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] g_array_free doesn't allow NULLs
- Date: Wed, 16 Jun 2010 23:58:12 +0000 (UTC)
commit e8abe6567c5c3a3eab95d2a67bb428c98fc99ad8
Author: William Jon McCann <jmccann redhat com>
Date: Wed Jun 16 19:53:47 2010 -0400
g_array_free doesn't allow NULLs
https://bugzilla.gnome.org/show_bug.cgi?id=589536
daemon/gdm-slave.c | 4 +++-
daemon/gdm-xdmcp-display-factory.c | 2 ++
2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gdm-slave.c b/daemon/gdm-slave.c
index 139c5cf..578ea7f 100644
--- a/daemon/gdm-slave.c
+++ b/daemon/gdm-slave.c
@@ -1678,7 +1678,9 @@ gdm_slave_finalize (GObject *object)
g_free (slave->priv->parent_display_name);
g_free (slave->priv->parent_display_x11_authority_file);
g_free (slave->priv->windowpath);
- g_array_free (slave->priv->display_x11_cookie, TRUE);
+ if (slave->priv->display_x11_cookie != NULL) {
+ g_array_free (slave->priv->display_x11_cookie, TRUE);
+ }
G_OBJECT_CLASS (gdm_slave_parent_class)->finalize (object);
}
diff --git a/daemon/gdm-xdmcp-display-factory.c b/daemon/gdm-xdmcp-display-factory.c
index 116cc97..06fafae 100644
--- a/daemon/gdm-xdmcp-display-factory.c
+++ b/daemon/gdm-xdmcp-display-factory.c
@@ -2353,8 +2353,10 @@ gdm_xdmcp_handle_request (GdmXdmcpDisplayFactory *factory,
GArray *cookie;
char *name;
+ cookie = NULL;
gdm_display_get_x11_cookie (display, &cookie, NULL);
+ name = NULL;
gdm_display_get_x11_display_name (display, &name, NULL);
g_debug ("GdmXdmcpDisplayFactory: Sending authorization key for display %s", name ? name : "(null)");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]