Merge branch 'misc-leaks' into 'master'

Fix small memory leaks

See merge request dbus/dbus!41
This commit is contained in:
Simon McVittie 2018-11-20 11:21:05 +00:00
commit 04d9ee3437
2 changed files with 2 additions and 0 deletions

View file

@ -425,6 +425,7 @@ bus_container_instance_new (BusContext *context,
if (!_dbus_string_steal_data (&path, &self->path))
goto fail;
_dbus_string_free (&path);
return self;
fail:

View file

@ -2258,6 +2258,7 @@ bus_driver_handle_become_monitor (DBusConnection *connection,
/* Special case: a zero-length array becomes [""] */
if (n_match_rules == 0)
{
dbus_free (match_rules);
match_rules = dbus_malloc (2 * sizeof (char *));
if (match_rules == NULL)