blob: 96290f41bef94deb9c35edf188740c5881d9d5a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
From 03aeaccbffa97c9237b57ca067e3da7388862129 Mon Sep 17 00:00:00 2001
From: Radoslaw Pajak <r.pajak@samsung.com>
Date: Fri, 8 Nov 2013 13:51:32 +0100
Subject: [PATCH] fixed memory freeing if error during listing services
Upstream-Status: Backport
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
Signed-off-by: Jonathan Liu <net147@gmail.com>
---
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 fcb7133..ea48a26 100644
--- a/bus/activation.c
+++ b/bus/activation.c
@@ -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;
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.9.0
|