diff options
author | Alessandro Bono <alessandro.bono369@gmail.com> | 2022-11-08 17:31:02 +0100 |
---|---|---|
committer | Ray Strode <halfline@gmail.com> | 2023-04-28 19:41:28 +0000 |
commit | 11dced65306d0ad548db9c60698d7e20c8965551 (patch) | |
tree | a32c318985bbca20e16aa9d3100faa3114061b34 /daemon | |
parent | a36c6ca8f220818e4339b1480b1cc7717ec5b90f (diff) | |
download | gdm-11dced65306d0ad548db9c60698d7e20c8965551.tar.gz |
gdm-session-linux-auditor: Use g_auto*
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/gdm-session-linux-auditor.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/daemon/gdm-session-linux-auditor.c b/daemon/gdm-session-linux-auditor.c index 0390adea..6b2e554d 100644 --- a/daemon/gdm-session-linux-auditor.c +++ b/daemon/gdm-session-linux-auditor.c @@ -54,9 +54,9 @@ log_user_message (GdmSessionAuditor *auditor, { GdmSessionLinuxAuditor *linux_auditor; char buf[512]; - char *username; - char *hostname; - char *display_device; + g_autofree char *username = NULL; + g_autofree char *hostname = NULL; + g_autofree char *display_device = NULL; struct passwd *pw; linux_auditor = GDM_SESSION_LINUX_AUDITOR (auditor); @@ -83,10 +83,6 @@ log_user_message (GdmSessionAuditor *auditor, buf, hostname, NULL, display_device, result); } - - g_free (username); - g_free (hostname); - g_free (display_device); } static void |