1 From 03aeaccbffa97c9237b57ca067e3da7388862129 Mon Sep 17 00:00:00 2001
2 From: Radoslaw Pajak <r.pajak@samsung.com>
3 Date: Fri, 8 Nov 2013 13:51:32 +0100
4 Subject: [PATCH] fixed memory freeing if error during listing services
6 Upstream-Status: Backport
8 Signed-off-by: Radoslaw Pajak <r.pajak@samsung.com>
9 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
10 Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71526
11 Signed-off-by: Jonathan Liu <net147@gmail.com>
13 bus/activation.c | 2 +-
15 2 files changed, 2 insertions(+), 2 deletions(-)
17 diff --git a/bus/activation.c b/bus/activation.c
18 index fcb7133..ea48a26 100644
19 --- a/bus/activation.c
20 +++ b/bus/activation.c
21 @@ -2179,7 +2179,7 @@ bus_activation_list_services (BusActivation *activation,
24 for (j = 0; j < i; j++)
25 - dbus_free (retval[i]);
26 + dbus_free (retval[j]);
30 diff --git a/bus/services.c b/bus/services.c
31 index 6f380fa..01a720e 100644
34 @@ -368,7 +368,7 @@ bus_registry_list_services (BusRegistry *registry,
37 for (j = 0; j < i; j++)
38 - dbus_free (retval[i]);
39 + dbus_free (retval[j]);