summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/dbus/dbus/fixed-memory-freeing-if-error-during-listing-service.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/dbus/dbus/fixed-memory-freeing-if-error-during-listing-service.patch')
-rw-r--r--meta/recipes-core/dbus/dbus/fixed-memory-freeing-if-error-during-listing-service.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-core/dbus/dbus/fixed-memory-freeing-if-error-during-listing-service.patch b/meta/recipes-core/dbus/dbus/fixed-memory-freeing-if-error-during-listing-service.patch
new file mode 100644
index 0000000..96290f4
--- /dev/null
+++ b/meta/recipes-core/dbus/dbus/fixed-memory-freeing-if-error-during-listing-service.patch
@@ -0,0 +1,45 @@
1From 03aeaccbffa97c9237b57ca067e3da7388862129 Mon Sep 17 00:00:00 2001
2From: Radoslaw Pajak <r.pajak@samsung.com>
3Date: Fri, 8 Nov 2013 13:51:32 +0100
4Subject: [PATCH] fixed memory freeing if error during listing services
5
6Upstream-Status: Backport
7
8Signed-off-by: Radoslaw Pajak <r.pajak@samsung.com>
9Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
10Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71526
11Signed-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
17diff --git a/bus/activation.c b/bus/activation.c
18index 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;
30diff --git a/bus/services.c b/bus/services.c
31index 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--
441.9.0
45