dbus - fix some ref/unref's for conns

@fix
master
Carsten Haitzler 3 weeks ago
parent bcf795d47f
commit a8f174e6c7
  1. 3
      src/bin/e_dbusmenu.c
  2. 6
      src/bin/e_sys.c

@ -434,16 +434,13 @@ e_dbusmenu_item_unref(E_DBusMenu_Item *m)
E_API void
e_dbusmenu_unload(E_DBusMenu_Ctx *ctx)
{
Eldbus_Connection *conn;
Eldbus_Object *obj;
EINA_SAFETY_ON_NULL_RETURN(ctx);
if (ctx->root_menu) e_dbusmenu_item_unref(ctx->root_menu);
obj = eldbus_proxy_object_get(ctx->proxy);
conn = eldbus_object_connection_get(obj);
eldbus_proxy_unref(ctx->proxy);
eldbus_object_unref(obj);
eldbus_connection_unref(conn);
free(ctx);
}

@ -522,26 +522,20 @@ e_sys_shutdown(void)
_e_sys_acpi_handler = NULL;
if (login1_session_proxy)
{
Eldbus_Connection *conn;
Eldbus_Object *obj;
obj = eldbus_proxy_object_get(login1_session_proxy);
conn = eldbus_object_connection_get(obj);
eldbus_proxy_unref(login1_session_proxy);
eldbus_object_unref(obj);
eldbus_connection_unref(conn);
login1_session_proxy = NULL;
}
if (login1_manger_proxy)
{
Eldbus_Connection *conn;
Eldbus_Object *obj;
obj = eldbus_proxy_object_get(login1_manger_proxy);
conn = eldbus_object_connection_get(obj);
eldbus_proxy_unref(login1_manger_proxy);
eldbus_object_unref(obj);
eldbus_connection_unref(conn);
login1_manger_proxy = NULL;
}
if (_e_sys_systemd_inhibit_fd >= 0)

Loading…
Cancel
Save