[gdm/benzea/fix-unknown-session-crash: 39/39] manager: Always write out parameter




commit 48d91b257ee8da15778470c9c300d0e340297c65
Author: Benjamin Berg <bberg redhat com>
Date:   Fri Aug 21 12:15:47 2020 +0200

    manager: Always write out parameter
    
    The get_display_and_details_for_bus_sender function does not return a
    proper error value. Due to this, it makes sense to always write the out
    parameters (though, I expect we have still more that we might need to
    write).
    
    This is just slightly safer, but the function probably isn't great as
    is.

 daemon/gdm-manager.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index 22f023fd..459ccf6b 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -576,10 +576,11 @@ get_display_and_details_for_bus_sender (GdmManager       *self,
                                           lookup_by_session_id,
                                           (gpointer) session_id);
 
+out:
         if (out_display != NULL) {
                 *out_display = display;
         }
-out:
+
         g_free (session_id);
 }
 


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