diff options
Diffstat (limited to 'bus/test-main.c')
-rw-r--r-- | bus/test-main.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bus/test-main.c b/bus/test-main.c index 278e4a88..2e0b952e 100644 --- a/bus/test-main.c +++ b/bus/test-main.c @@ -26,6 +26,7 @@ #include <stdlib.h> #include <dbus/dbus-string.h> #include <dbus/dbus-sysdeps.h> +#include <dbus/dbus-internals.h> static void die (const char *failure) @@ -55,6 +56,16 @@ main (int argc, char **argv) if (!bus_dispatch_test (&test_data_dir)) die ("dispatch"); + dbus_shutdown (); + + printf ("%s: checking for memleaks\n", argv[0]); + if (_dbus_get_malloc_blocks_outstanding () != 0) + { + _dbus_warn ("%d dbus_malloc blocks were not freed\n", + _dbus_get_malloc_blocks_outstanding ()); + die ("memleaks"); + } + printf ("%s: Success\n", argv[0]); return 0; |