Message ID | 20220925163139.194382-1-i@hexchain.org |
---|---|
State | New |
Headers | show |
Series | [BlueZ] tools/mpris-proxy: unregister object path if player registration fails | expand |
diff --git a/tools/mpris-proxy.c b/tools/mpris-proxy.c index 3779b6887..e5fc91fdb 100644 --- a/tools/mpris-proxy.c +++ b/tools/mpris-proxy.c @@ -480,6 +480,7 @@ static void add_player(DBusConnection *conn, const char *name, reply = dbus_connection_send_with_reply_and_block(sys, msg, -1, &err); if (!reply) { fprintf(stderr, "Can't register player\n"); + dbus_connection_unregister_object_path(sys, path); free(owner); if (dbus_error_is_set(&err)) { fprintf(stderr, "%s\n", err.message);