diff options
author | Max Kellermann <max@duempel.org> | 2014-06-10 23:00:47 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-06-10 23:21:09 +0200 |
commit | 31e29e62f48b3fcc8552472a8beb8bd1a5f06d5f (patch) | |
tree | 325ea739cca88c70ed3d4f92b472be7a5b7befb9 | |
parent | dfcb5729853945f27188780fc1cf50d3c09c3188 (diff) | |
download | mpd-31e29e62f48b3fcc8552472a8beb8bd1a5f06d5f.tar.gz mpd-31e29e62f48b3fcc8552472a8beb8bd1a5f06d5f.tar.xz mpd-31e29e62f48b3fcc8552472a8beb8bd1a5f06d5f.zip |
zeroconf/Avahi: call dbus_shutdown() during shutdown
Make valgrind happy.
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/zeroconf/ZeroconfAvahi.cxx | 4 | ||||
-rw-r--r-- | valgrind.suppressions | 28 |
3 files changed, 5 insertions, 29 deletions
diff --git a/configure.ac b/configure.ac index 689c0b40a..45e427c8f 100644 --- a/configure.ac +++ b/configure.ac @@ -825,7 +825,7 @@ avahi) ;; esac -MPD_AUTO_PKG(avahi, AVAHI, [avahi-client], +MPD_AUTO_PKG(avahi, AVAHI, [avahi-client dbus-1], [avahi client library], [avahi-client not found]) if test x$enable_avahi = xyes; then AC_DEFINE([HAVE_AVAHI], 1, [Define to enable Avahi Zeroconf support]) diff --git a/src/zeroconf/ZeroconfAvahi.cxx b/src/zeroconf/ZeroconfAvahi.cxx index 8cd09cbed..35f3dc9dc 100644 --- a/src/zeroconf/ZeroconfAvahi.cxx +++ b/src/zeroconf/ZeroconfAvahi.cxx @@ -34,6 +34,8 @@ #include <avahi-common/malloc.h> #include <avahi-common/error.h> +#include <dbus/dbus.h> + static constexpr Domain avahi_domain("avahi"); static char *avahiName; @@ -272,4 +274,6 @@ AvahiDeinit(void) avahi_free(avahiName); avahiName = nullptr; + + dbus_shutdown(); } diff --git a/valgrind.suppressions b/valgrind.suppressions index 308427fdd..d35e8d7e8 100644 --- a/valgrind.suppressions +++ b/valgrind.suppressions @@ -297,34 +297,6 @@ fun:dlclose } -# is that a leak in libdbus? - -{ - <insert a suppression name here> - Memcheck:Leak - fun:?alloc - ... - obj:*/libdbus-*.so.* - fun:avahi_client_new -} - -{ - <insert a suppression name here> - Memcheck:Leak - fun:malloc - obj:/usr/lib/libdbus-1.so.3.4.0 - fun:dbus_message_new_error - obj:/usr/lib/libdbus-1.so.3.4.0 - fun:dbus_connection_send_with_reply - fun:dbus_connection_send_with_reply_and_block - obj:/usr/lib/libavahi-client.so.3.2.4 - fun:avahi_entry_group_new - fun:avahiRegisterService - fun:avahiClientCallback - obj:/usr/lib/libavahi-client.so.3.2.4 - fun:avahi_client_new -} - { inet_ntoa Memcheck:Leak |