mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-08 09:08:15 +02:00
Merge branch 'fix-issue-360' into 'master'
Fix test-bus related memory leaks on Windows Closes #360 See merge request dbus/dbus!232
This commit is contained in:
commit
6ba6f5e870
1 changed files with 13 additions and 7 deletions
|
|
@ -898,6 +898,7 @@ bus_activation_reload (BusActivation *activation,
|
|||
{
|
||||
DBusList *link;
|
||||
char *dir;
|
||||
DBusError local_error = DBUS_ERROR_INIT;
|
||||
|
||||
if (activation->server_address != NULL)
|
||||
dbus_free (activation->server_address);
|
||||
|
|
@ -965,13 +966,18 @@ bus_activation_reload (BusActivation *activation,
|
|||
}
|
||||
|
||||
/* only fail on OOM, it is ok if we can't read the directory */
|
||||
if (!update_directory (activation, s_dir, error))
|
||||
{
|
||||
if (dbus_error_has_name (error, DBUS_ERROR_NO_MEMORY))
|
||||
goto failed;
|
||||
else
|
||||
dbus_error_free (error);
|
||||
}
|
||||
if (!update_directory (activation, s_dir, &local_error))
|
||||
{
|
||||
if (dbus_error_has_name (&local_error, DBUS_ERROR_NO_MEMORY))
|
||||
{
|
||||
dbus_move_error (&local_error, error);
|
||||
goto failed;
|
||||
}
|
||||
else
|
||||
{
|
||||
dbus_error_free (&local_error);
|
||||
}
|
||||
}
|
||||
|
||||
link = _dbus_list_get_next_link (directories, link);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue