diff options
author | Brian Cameron <brian.cameron@sun.com> | 2005-06-15 12:42:23 +0000 |
---|---|---|
committer | Brian Cameron <bcameron@src.gnome.org> | 2005-06-15 12:42:23 +0000 |
commit | 170dc501f99a183b581d22d770cf641014df6193 (patch) | |
tree | 362d5923257d6eb188ad48c3573c87de80017f02 /gui | |
parent | f63a84b3f40e3414cefc345acae9422669689a8b (diff) | |
download | gdm-170dc501f99a183b581d22d770cf641014df6193.tar.gz |
Fix leaks. Addresses bug #307482. Patch provided by Kjartan Maraas. Remove
2005-06-15 Brian Cameron <brian.cameron@sun.com>
* gui/gdmXnestchooser.c, gui/gdmcomm.c,
gui/gdmflexiserver.c, gui/gdmphotosetup.c,
gui/gdmwm.c: Fix leaks. Addresses bug
#307482. Patch provided by Kjartan Maraas.
* gui/modules/dwellmouselistener.c,
gui/modules/keymouselistener.c: Remove
needless "\n" from syslog calls. Also forgot
to mention in my last commit that we no longer
modify PATH since gdm2 now puts full path to
executables in the gesture listener config files.
More secure.
Diffstat (limited to 'gui')
-rw-r--r-- | gui/gdmXnestchooser.c | 5 | ||||
-rw-r--r-- | gui/gdmcomm.c | 1 | ||||
-rw-r--r-- | gui/gdmflexiserver.c | 2 | ||||
-rw-r--r-- | gui/gdmphotosetup.c | 3 | ||||
-rw-r--r-- | gui/gdmwm.c | 28 | ||||
-rw-r--r-- | gui/modules/dwellmouselistener.c | 2 | ||||
-rw-r--r-- | gui/modules/keymouselistener.c | 4 |
7 files changed, 13 insertions, 32 deletions
diff --git a/gui/gdmXnestchooser.c b/gui/gdmXnestchooser.c index 41adac6a..3afe6835 100644 --- a/gui/gdmXnestchooser.c +++ b/gui/gdmXnestchooser.c @@ -511,6 +511,7 @@ main (int argc, char *argv[]) /* complex and wonderous way to get the exec vector */ execvec = make_us_an_exec_vector (xnest); + g_free (xnest); if (execvec == NULL) { GtkWidget *d; @@ -581,8 +582,10 @@ main (int argc, char *argv[]) } pid = 0; - if (pidfile != NULL) + if (pidfile != NULL) { VE_IGNORE_EINTR (fp = fopen (pidfile, "r")); + g_free (pidfile); + } if (fp != NULL) { int r; VE_IGNORE_EINTR (r = fscanf (fp, "%ld", &pid)); diff --git a/gui/gdmcomm.c b/gui/gdmcomm.c index 79f9fbb7..db376b22 100644 --- a/gui/gdmcomm.c +++ b/gui/gdmcomm.c @@ -65,6 +65,7 @@ do_command (int fd, const char *command, gboolean get_response) ret = send (fd, cstr, strlen (cstr), 0); signal (SIGPIPE, old_handler); #endif + g_free (cstr); if (ret < 0) return NULL; diff --git a/gui/gdmflexiserver.c b/gui/gdmflexiserver.c index 11eb4e03..bd0f0db3 100644 --- a/gui/gdmflexiserver.c +++ b/gui/gdmflexiserver.c @@ -774,6 +774,8 @@ main (int argc, char *argv[]) } ret = gdmcomm_call_gdm (command, auth_cookie, version, 5); + g_free (command); + if (ret != NULL && strncmp (ret, "OK ", 3) == 0) { diff --git a/gui/gdmphotosetup.c b/gui/gdmphotosetup.c index 7862cf72..3c6e6f2e 100644 --- a/gui/gdmphotosetup.c +++ b/gui/gdmphotosetup.c @@ -275,6 +275,8 @@ main (int argc, char *argv[]) gtk_dialog_run (GTK_DIALOG (d)); gtk_widget_destroy (d); } + g_free (greeter); + g_free (remotegreeter); dialog = gtk_dialog_new_with_buttons (_("Login Photo"), NULL /* parent */, @@ -398,6 +400,7 @@ main (int argc, char *argv[]) } } + g_free (current_pix); gtk_widget_destroy (dialog); return 0; diff --git a/gui/gdmwm.c b/gui/gdmwm.c index 10a902e1..d32a022e 100644 --- a/gui/gdmwm.c +++ b/gui/gdmwm.c @@ -1242,34 +1242,6 @@ static GSourceFuncs event_funcs = { event_dispatch }; -#if 0 -/* ALEX: WTF is this? It's not used by anything, and I don't want - * the greeter to depend on libgnomeui and libbonoboui. - */ - -/* HAAAAAAAAAAAAAACK */ -void -bonobo_dock_item_grab_pointer (BonoboDockItem *item) -{ - GdkCursor *fleur; - - fleur = gdk_cursor_new (GDK_FLEUR); - - /* Hm, not sure this is the right thing to do, but it seems to work. */ - while (gdk_pointer_grab (item->bin_window, - FALSE, - (GDK_BUTTON1_MOTION_MASK | - GDK_POINTER_MOTION_HINT_MASK | - GDK_BUTTON_RELEASE_MASK), - NULL, - fleur, - GDK_CURRENT_TIME) != 0) - gtk_main_iteration (); - - gdk_cursor_destroy (fleur); -} -#endif - void gdm_wm_init (Window login_window) { diff --git a/gui/modules/dwellmouselistener.c b/gui/modules/dwellmouselistener.c index cd1502f1..8f351aeb 100644 --- a/gui/modules/dwellmouselistener.c +++ b/gui/modules/dwellmouselistener.c @@ -166,7 +166,7 @@ init_xinput (GdkDisplay *display, GdkWindow *root) } if (debug_gestures) - syslog (LOG_WARNING, "%d event types available\n", number); + syslog (LOG_WARNING, "%d event types available", number); if (XSelectExtensionEvent (GDK_WINDOW_XDISPLAY (root), GDK_WINDOW_XWINDOW (root), diff --git a/gui/modules/keymouselistener.c b/gui/modules/keymouselistener.c index c900895d..f898fbae 100644 --- a/gui/modules/keymouselistener.c +++ b/gui/modules/keymouselistener.c @@ -209,7 +209,7 @@ init_xinput (GdkDisplay *display, GdkWindow *root) } if (debug_gestures) - syslog (LOG_WARNING, "%d event types available\n", number); + syslog (LOG_WARNING, "%d event types available", number); if (XSelectExtensionEvent(GDK_WINDOW_XDISPLAY (root), GDK_WINDOW_XWINDOW (root), @@ -252,7 +252,7 @@ load_gestures(gchar *path) if (fp == NULL) { /* TODO - I18n */ if (debug_gestures) - syslog (LOG_WARNING, _("Cannot open gestures file: %s\n"), + syslog (LOG_WARNING, _("Cannot open gestures file: %s"), path); return; } |