From: Simon McVittie Date: Mon, 5 Jun 2017 17:16:42 +0000 (+0100) Subject: transport: Don't pile up errors for semicolon-separated components X-Git-Tag: dbus-1.11.14~45 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ecdcb86bff42d2bb9cac617bf79f0aa3d47676d9;p=thirdparty%2Fdbus.git 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 Reviewed-by: Philip Withnall Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101257 --- diff --git a/dbus/dbus-transport.c b/dbus/dbus-transport.c index 69e2241d7..f2a961503 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; }