mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-05 13:28:02 +02:00
_dbus_server_new_for_tcp_socket: Don't pile up errors on OOM
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
This commit is contained in:
parent
1ecaff10da
commit
d48d31cc21
1 changed files with 4 additions and 2 deletions
|
|
@ -482,8 +482,10 @@ _dbus_server_new_for_tcp_socket (const char *host,
|
|||
|
||||
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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue