[gdm] worker: drop bogus memset/g_free



commit e4a718fefd620fb3d80f0fba6f7faecd435ea89d
Author: Ray Strode <rstrode redhat com>
Date:   Fri Jun 22 11:07:35 2012 -0400

    worker: drop bogus memset/g_free
    
    gdm_session_worker_process_pam_message returns C allocated memory
    on success that gets freed by pam later.
    
    On failure it returns NULL.  We had code in teh failure path that
    checked if the result was not NULL and then tried to g_free.
    
    Drop this wrong code.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=678585

 daemon/gdm-session-worker.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
---
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index 1e1cf37..d98f182 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -921,10 +921,6 @@ gdm_session_worker_pam_new_messages_handler (int                        number_o
                                                                        messages[i],
                                                                        &response_text);
                 if (!got_response) {
-                        if (response_text != NULL) {
-                                memset (response_text, '\0', strlen (response_text));
-                                g_free (response_text);
-                        }
                         goto out;
                 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]