From 6cd430352c2ad613c1572f5a8f30d4fd11a3f177 Mon Sep 17 00:00:00 2001 From: Radoslaw Pajak Date: Fri, 8 Nov 2013 13:51:32 +0100 Subject: [PATCH] fixed memory freeing if error during listing services Signed-off-by: Radoslaw Pajak --- bus/activation.c | 2 +- bus/services.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bus/activation.c b/bus/activation.c index 868ce05..fa6c156 100644 --- a/bus/activation.c +++ b/bus/activation.c @@ -2186,7 +2186,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; diff --git a/bus/services.c b/bus/services.c index 6f380fa..01a720e 100644 --- a/bus/services.c +++ b/bus/services.c @@ -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; -- 1.7.9.5