summaryrefslogtreecommitdiff
path: root/daemon
diff options
context:
space:
mode:
authorAlessandro Bono <alessandro.bono369@gmail.com>2022-11-08 17:31:02 +0100
committerRay Strode <halfline@gmail.com>2023-04-28 19:41:28 +0000
commit11dced65306d0ad548db9c60698d7e20c8965551 (patch)
treea32c318985bbca20e16aa9d3100faa3114061b34 /daemon
parenta36c6ca8f220818e4339b1480b1cc7717ec5b90f (diff)
downloadgdm-11dced65306d0ad548db9c60698d7e20c8965551.tar.gz
gdm-session-linux-auditor: Use g_auto*
Diffstat (limited to 'daemon')
-rw-r--r--daemon/gdm-session-linux-auditor.c10
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