From c4ee97bf1fe6ca9caf4f17a2a5a77a620ff7d9d7 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 15 Jul 2006 20:15:30 +0000 Subject: work around a limitation in Gentoo's DBUS build (which is compiled with --disable-checks): never try to unregister non-existing object paths from DBUS. (closes #50 - this time for sure) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1235 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-daemon/dbus-async-address-resolver.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'avahi-daemon/dbus-async-address-resolver.c') diff --git a/avahi-daemon/dbus-async-address-resolver.c b/avahi-daemon/dbus-async-address-resolver.c index f51d205..f05af8f 100644 --- a/avahi-daemon/dbus-async-address-resolver.c +++ b/avahi-daemon/dbus-async-address-resolver.c @@ -38,7 +38,12 @@ void avahi_dbus_async_address_resolver_free(AsyncAddressResolverInfo *i) { if (i->address_resolver) avahi_s_address_resolver_free(i->address_resolver); - dbus_connection_unregister_object_path(server->bus, i->path); + + if (i->path) { + dbus_connection_unregister_object_path(server->bus, i->path); + avahi_free(i->path); + } + AVAHI_LLIST_REMOVE(AsyncAddressResolverInfo, async_address_resolvers, i->client->async_address_resolvers, i); i->client->n_objects--; -- cgit