diff --git a/bus/containers.c b/bus/containers.c index 5542e16b..213ce3c9 100644 --- a/bus/containers.c +++ b/bus/containers.c @@ -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: diff --git a/bus/driver.c b/bus/driver.c index 8015f28b..9b3e43ee 100644 --- a/bus/driver.c +++ b/bus/driver.c @@ -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)