If _dbus_noncefile_create() has failed and set error, it is incorrect
for us to set it again.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89104
if (use_nonce)
{
- if (!_dbus_noncefile_create (&noncefile, error) ||
- !_dbus_string_append (&address, ",noncefile=") ||
+ if (!_dbus_noncefile_create (&noncefile, error))
+ goto failed_2;
+
+ if (!_dbus_string_append (&address, ",noncefile=") ||
!_dbus_address_append_escaped (&address, _dbus_noncefile_get_path (noncefile)))
{
dbus_set_error (error, DBUS_ERROR_NO_MEMORY, NULL);