meta: fix refactor to a better layout
[scm/bb/meta-tizen.git] / meta-tizen-adaptation / meta / recipes-core / dbus / dbus / fixed-memory-freeing-if-error-during-listing-service.patch
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
5
6 Upstream-Status: Backport
7
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>
12 ---
13  bus/activation.c | 2 +-
14  bus/services.c   | 2 +-
15  2 files changed, 2 insertions(+), 2 deletions(-)
16
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,
22  
23   error:
24    for (j = 0; j < i; j++)
25 -    dbus_free (retval[i]);
26 +    dbus_free (retval[j]);
27    dbus_free (retval);
28  
29    return FALSE;
30 diff --git a/bus/services.c b/bus/services.c
31 index 6f380fa..01a720e 100644
32 --- a/bus/services.c
33 +++ b/bus/services.c
34 @@ -368,7 +368,7 @@ bus_registry_list_services (BusRegistry *registry,
35    
36   error:
37    for (j = 0; j < i; j++)
38 -    dbus_free (retval[i]);
39 +    dbus_free (retval[j]);
40    dbus_free (retval);
41  
42    return FALSE;
43 -- 
44 1.9.0
45