From d14a5028871d64f7edaf698d3d66a499e57692f9 Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Wed, 16 Jun 2010 23:53:47 +0000 Subject: g_array_free doesn't allow NULLs https://bugzilla.gnome.org/show_bug.cgi?id=589536 diff -Nur -x '*.orig' -x '*~' gdm-2.30.2.is.2.30.0/daemon/gdm-slave.c gdm-2.30.2.is.2.30.0.new/daemon/gdm-slave.c --- gdm-2.30.2.is.2.30.0/daemon/gdm-slave.c 2010-06-17 15:37:10.000000000 +0200 +++ gdm-2.30.2.is.2.30.0.new/daemon/gdm-slave.c 2010-06-17 15:37:26.000000000 +0200 @@ -1641,7 +1641,9 @@ g_free (slave->priv->display_x11_authority_file); g_free (slave->priv->parent_display_name); g_free (slave->priv->parent_display_x11_authority_file); - 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 -Nur -x '*.orig' -x '*~' gdm-2.30.2.is.2.30.0/daemon/gdm-xdmcp-display-factory.c gdm-2.30.2.is.2.30.0.new/daemon/gdm-xdmcp-display-factory.c --- gdm-2.30.2.is.2.30.0/daemon/gdm-xdmcp-display-factory.c 2010-03-29 23:42:03.000000000 +0200 +++ gdm-2.30.2.is.2.30.0.new/daemon/gdm-xdmcp-display-factory.c 2010-06-17 15:37:11.000000000 +0200 @@ -2308,8 +2308,10 @@ 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)");