From 9258c87292a8ea807aa66cdeb1a7f1eac6c36d6c Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 5 Jun 2017 18:16:42 +0100 Subject: [PATCH 02/10] transport: Don't pile up errors for semicolon-separated components If we somehow get an autolaunch address with multiple semicolon-separated components, and one of them fails, then we will hit an assertion failure when we try the next one. Signed-off-by: Simon McVittie --- dbus/dbus-transport.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dbus/dbus-transport.c b/dbus/dbus-transport.c index 69e2241d..f2a96150 100644 --- a/dbus/dbus-transport.c +++ b/dbus/dbus-transport.c @@ -254,13 +254,16 @@ check_address (const char *address, DBusError *error) int len, i; _dbus_assert (address != NULL); + _DBUS_ASSERT_ERROR_IS_CLEAR (error); if (!dbus_parse_address (address, &entries, &len, error)) return NULL; /* not a valid address */ for (i = 0; i < len; i++) { + dbus_error_free (error); transport = _dbus_transport_open (entries[i], error); + if (transport != NULL) break; } -- 2.11.0