From: Jonathan Liu <net147@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 2/3] dbus: backport memory leak patch for error when listing services
Date: Wed, 2 Apr 2014 13:50:09 +1100 [thread overview]
Message-ID: <1396407010-6283-2-git-send-email-net147@gmail.com> (raw)
In-Reply-To: <1396407010-6283-1-git-send-email-net147@gmail.com>
Signed-off-by: Jonathan Liu <net147@gmail.com>
---
meta/recipes-core/dbus/dbus.inc | 1 +
...y-freeing-if-error-during-listing-service.patch | 45 ++++++++++++++++++++++
2 files changed, 46 insertions(+)
create mode 100644 meta/recipes-core/dbus/dbus/fixed-memory-freeing-if-error-during-listing-service.patch
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index 5d57ff4..5727ae7 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -16,6 +16,7 @@ SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
file://os-test.patch \
file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
file://Set-correct-address-when-using-address-systemd.patch \
+ file://fixed-memory-freeing-if-error-during-listing-service.patch \
"
inherit useradd autotools pkgconfig gettext update-rc.d
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 @@
+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
+
--
1.9.0
next prev parent reply other threads:[~2014-04-02 2:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-02 2:50 [PATCH 1/3] dbus: backport fix for bus activation under systemd session Jonathan Liu
2014-04-02 2:50 ` Jonathan Liu [this message]
2014-04-02 2:50 ` [PATCH 3/3] systemd: backport patch to avoid assertion failures Jonathan Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1396407010-6283-2-git-send-email-net147@gmail.com \
--to=net147@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox