fixed memory freeing if error during listing services

Signed-off-by: Radoslaw Pajak <r.pajak@samsung.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71526
This commit is contained in:
Radoslaw Pajak 2013-11-08 13:51:32 +01:00 committed by Simon McVittie
parent c9ebd602c1
commit 03aeaccbff
2 changed files with 2 additions and 2 deletions

View file

@ -2179,7 +2179,7 @@ bus_activation_list_services (BusActivation *activation,
error:
for (j = 0; j < i; j++)
dbus_free (retval[i]);
dbus_free (retval[j]);
dbus_free (retval);
return FALSE;

View file

@ -368,7 +368,7 @@ bus_registry_list_services (BusRegistry *registry,
error:
for (j = 0; j < i; j++)
dbus_free (retval[i]);
dbus_free (retval[j]);
dbus_free (retval);
return FALSE;