fix(linux/xdgportal): descriptor/pointer cleanups (#4840)

This commit is contained in:
Conn O'Griofa
2026-03-11 15:48:09 +00:00
committed by GitHub
parent c8b9bdbd3b
commit b3f0e2370c
+5 -5
View File
@@ -194,13 +194,13 @@ namespace portal {
}
if (screencast_proxy) {
g_object_unref(screencast_proxy);
g_clear_object(&screencast_proxy);
}
if (remote_desktop_proxy) {
g_object_unref(remote_desktop_proxy);
g_clear_object(&remote_desktop_proxy);
}
if (conn) {
g_object_unref(conn);
g_clear_object(&conn);
}
}
@@ -531,8 +531,8 @@ namespace portal {
}
int open_pipewire_remote(const gchar *session_path, int &fd) {
GUnixFDList *fd_list;
GVariant *msg = g_variant_new("(oa{sv})", session_path, nullptr);
g_autoptr(GUnixFDList) fd_list = nullptr;
g_autoptr(GVariant) msg = g_variant_ref_sink(g_variant_new("(oa{sv})", session_path, nullptr));
g_autoptr(GError) err = nullptr;
g_autoptr(GVariant) reply = g_dbus_proxy_call_with_unix_fd_list_sync(screencast_proxy, "OpenPipeWireRemote", msg, G_DBUS_CALL_FLAGS_NONE, -1, nullptr, &fd_list, nullptr, &err);