mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-05 05:18:00 +02:00
clean up credentials on OOM in process_config_first_time_only
Origin: vendor, Maemo Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33128 Bug-NB: NB#180486 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
This commit is contained in:
parent
a8302efd2c
commit
a144bf4989
1 changed files with 12 additions and 3 deletions
15
bus/bus.c
15
bus/bus.c
|
|
@ -372,11 +372,20 @@ process_config_first_time_only (BusContext *context,
|
|||
if (!credentials)
|
||||
goto oom;
|
||||
if (!_dbus_string_append (&log_prefix, "[session "))
|
||||
goto oom;
|
||||
{
|
||||
_dbus_credentials_unref (credentials);
|
||||
goto oom;
|
||||
}
|
||||
if (!_dbus_credentials_to_string_append (credentials, &log_prefix))
|
||||
goto oom;
|
||||
{
|
||||
_dbus_credentials_unref (credentials);
|
||||
goto oom;
|
||||
}
|
||||
if (!_dbus_string_append (&log_prefix, "] "))
|
||||
goto oom;
|
||||
{
|
||||
_dbus_credentials_unref (credentials);
|
||||
goto oom;
|
||||
}
|
||||
_dbus_credentials_unref (credentials);
|
||||
}
|
||||
if (!_dbus_string_steal_data (&log_prefix, &context->log_prefix))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue