Commit
91306ef938873fce8f2ae2d4a6b3282d0379c65a introduced
two memory leaks on OOM error paths. In one case the
environment string array wasn't getting freed, and in the
other case it was getting freed with dbus_free instead of
dbus_free_string_array.
_dbus_hash_iter_init (activation->environment, &iter);
if (!_dbus_string_init (&entry))
- return NULL;
+ {
+ dbus_free_string_array (environment);
+ return NULL;
+ }
while (_dbus_hash_iter_next (&iter))
{
if (i != length)
{
- dbus_free (environment);
+ dbus_free_string_array (environment);
environment = NULL;
}