summaryrefslogtreecommitdiff
path: root/src/libaccountsservice/act-user.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2017-10-27 18:59:04 +0200
committerRay Strode <rstrode@redhat.com>2017-10-27 13:17:45 -0400
commit2a535b8b8ead6ce1ad3b6054ab04bd63cde3e056 (patch)
treee0f0c8ea3abfdfec454e2bc59e4351f6d148924d /src/libaccountsservice/act-user.c
parentccd8388dd026c390667d7bfc6744a730d951166d (diff)
lib: Plug leak
When updating the user, the previous login_history variant would be leaked. https://bugs.freedesktop.org/show_bug.cgi?id=103487
Diffstat (limited to 'src/libaccountsservice/act-user.c')
-rw-r--r--src/libaccountsservice/act-user.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libaccountsservice/act-user.c b/src/libaccountsservice/act-user.c
index dbb9b53..300118a 100644
--- a/src/libaccountsservice/act-user.c
+++ b/src/libaccountsservice/act-user.c
@@ -1544,6 +1544,7 @@ _act_user_load_from_user (ActUser *user,
user->login_time = user_to_copy->login_time;
g_object_notify (G_OBJECT (user), "login-time");
+ g_clear_pointer (&user->login_history, g_variant_unref);
user->login_history = user_to_copy->login_history ? g_variant_ref (user_to_copy->login_history) : NULL;
g_object_notify (G_OBJECT (user), "login-history");