summaryrefslogtreecommitdiff
path: root/daemon/gdm-display-access-file.c
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2018-05-16 14:04:51 -0400
committerRay Strode <rstrode@redhat.com>2018-05-16 14:08:11 -0400
commitae4ace01f8bf25e32062fab75199845147a44b6a (patch)
treef171a730afda3654d9830d6e20d4fd2f81e1e86f /daemon/gdm-display-access-file.c
parenta1b491676c2849f4c366fb29a8bc8754056f7f4b (diff)
downloadgdm-ae4ace01f8bf25e32062fab75199845147a44b6a.tar.gz
display-access-file: fix early free
The unused function gdm_display_access_file_remove_display frees some variables and then tries to use them. For completeness, this commit moves the free() calls to the appropriate place in the code. A subsequent commit will drop the function. https://bugzilla.gnome.org/show_bug.cgi?id=796176
Diffstat (limited to 'daemon/gdm-display-access-file.c')
-rw-r--r--daemon/gdm-display-access-file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/daemon/gdm-display-access-file.c b/daemon/gdm-display-access-file.c
index 9bf818d2..c6d01351 100644
--- a/daemon/gdm-display-access-file.c
+++ b/daemon/gdm-display-access-file.c
@@ -598,9 +598,6 @@ gdm_display_access_file_remove_display (GdmDisplayAccessFile *file,
number,
name_length,
name);
- g_free (address);
- g_free (number);
- g_free (name);
if (auth_entry != NULL) {
XauDisposeAuth (auth_entry);
@@ -625,6 +622,9 @@ gdm_display_access_file_remove_display (GdmDisplayAccessFile *file,
}
}
+ g_free (address);
+ g_free (number);
+ g_free (name);
if (result == FALSE) {
g_set_error (error,