Fix GSMonitor leak when screensaver fails to start
Leak report
461 (184 direct, 277 indirect) bytes in 1 blocks are definitely lost in loss record 8,056 of 8,326
at 0x484BC13: calloc (vg_replace_malloc.c:1675)
by 0x49B6D8A: dbus_message_new_empty_header (dbus-message.c:1251)
by 0x49B8D1A: _dbus_message_loader_queue_messages (dbus-message.c:4695)
by 0x49C1073: _dbus_transport_get_dispatch_status (dbus-transport.c:1142)
by 0x49C125C: _dbus_transport_queue_messages (dbus-transport.c:1169)
by 0x49C230E: do_reading (dbus-transport-socket.c:907)
by 0x49C2932: socket_do_iteration (dbus-transport-socket.c:1221)
by 0x49A847D: UnknownInlinedFun (dbus-transport.c:1013)
by 0x49A847D: UnknownInlinedFun (dbus-transport.c:996)
by 0x49A847D: _dbus_connection_do_iteration_unlocked (dbus-connection.c:1229)
by 0x49BCF30: UnknownInlinedFun (dbus-connection.c:2445)
by 0x49BCF30: dbus_pending_call_block (dbus-pending-call.c:768)
by 0x49AA242: dbus_connection_send_with_reply_and_block (dbus-connection.c:3586)
by 0x49AA4ED: dbus_bus_register (dbus-bus.c:696)
by 0x49AA7C2: internal_bus_get (dbus-bus.c:484)
by 0x11486B: gs_listener_dbus_init (gs-listener-dbus.c:1712)
by 0x114B88: gs_listener_init (gs-listener-dbus.c:2203)
by 0x547A768: g_type_create_instance (gtype.c:1951)
by 0x545CF87: g_object_new_internal (gobject.c:2606)
by 0x545E82D: g_object_new_with_properties (gobject.c:2769)
by 0x545F66E: g_object_new (gobject.c:2415)
by 0x1181CF: gs_listener_new (gs-listener-dbus.c:2250)
by 0x113F3E: gs_monitor_init (gs-monitor.c:184)
by 0x547A768: g_type_create_instance (gtype.c:1951)
by 0x545CF87: g_object_new_internal (gobject.c:2606)
by 0x545E82D: g_object_new_with_properties (gobject.c:2769)
by 0x545F66E: g_object_new (gobject.c:2415)
by 0x114678: gs_monitor_new (gs-monitor.c:217)
by 0x113DE2: main (xfce4-screensaver.c:91)
Testing
- No issues were detected when testing the patch with Valgrind