diff options
author | Ray Strode <rstrode@redhat.com> | 2014-01-29 11:01:00 -0500 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2014-02-06 10:56:38 -0500 |
commit | 72716d35788903882200cff8a8588be5b7f357a3 (patch) | |
tree | f300ebea3cd3390f083067e282c9afb60d265bf1 | |
parent | 51572ce25c6d2ba11be8b0f983b627b827e3b405 (diff) | |
download | gdm-72716d35788903882200cff8a8588be5b7f357a3.tar.gz |
display: fix memory leak if AddUserAuthentication called more than once
Noted on downstream bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1020885
-rw-r--r-- | daemon/gdm-display.c | 9 |
1 files changed, 8 insertions, 1 deletions
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); |