From 72716d35788903882200cff8a8588be5b7f357a3 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 29 Jan 2014 11:01:00 -0500 Subject: display: fix memory leak if AddUserAuthentication called more than once Noted on downstream bug: https://bugzilla.redhat.com/show_bug.cgi?id=1020885 --- daemon/gdm-display.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c index 2e28cac6..297b41a1 100644 --- a/daemon/gdm-display.c +++ b/daemon/gdm-display.c @@ -225,7 +225,14 @@ gdm_display_real_add_user_authorization (GdmDisplay *display, gboolean res; g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE); - g_return_val_if_fail (display->priv->access_file != NULL, FALSE); + + if (display->priv->user_access_file != NULL) { + g_set_error (error, + G_DBUS_ERROR, + G_DBUS_ERROR_ACCESS_DENIED, + "user access already assigned"); + return FALSE; + } g_debug ("GdmDisplay: Adding user authorization for %s", username); -- cgit v1.2.1