[Shr-Devel] [PATCH] packagekit: fix segfaults when hald is not running
Sebastian Krzyszkowiak
seba.dos1 at gmail.com
Thu Aug 13 16:36:28 CEST 2009
---
.../fix-segfault-when-hald-is-not-running.patch | 22 ++++++++++++++++++++
recipes/packagekit/packagekit_0.5.1.bb | 3 +-
2 files changed, 24 insertions(+), 1 deletions(-)
create mode 100644 recipes/packagekit/files/fix-segfault-when-hald-is-not-running.patch
diff --git a/recipes/packagekit/files/fix-segfault-when-hald-is-not-running.patch b/recipes/packagekit/files/fix-segfault-when-hald-is-not-running.patch
new file mode 100644
index 0000000..72889ec
--- /dev/null
+++ b/recipes/packagekit/files/fix-segfault-when-hald-is-not-running.patch
@@ -0,0 +1,22 @@
+From cdb5dad2785a6f418bec25e80283c0554fa972cd Mon Sep 17 00:00:00 2001
+From: Richard Hughes <richard at hughsie.com>
+Date: Thu, 13 Aug 2009 13:14:19 +0000
+Subject: If there is no HAL, don't segfault when unloading PkInhibit
+
+---
+diff --git a/src/pk-inhibit.c b/src/pk-inhibit.c
+index a9e68a7..5038aec 100644
+--- a/src/pk-inhibit.c
++++ b/src/pk-inhibit.c
+@@ -215,7 +215,8 @@ pk_inhibit_finalize (GObject *object)
+ }
+ /* no need to free the data in the array */
+ g_ptr_array_free (inhibit->priv->array, TRUE);
+- g_object_unref (inhibit->priv->proxy);
++ if (inhibit->priv->proxy != NULL)
++ g_object_unref (inhibit->priv->proxy);
+
+ G_OBJECT_CLASS (pk_inhibit_parent_class)->finalize (object);
+ }
+--
+cgit v0.8.2
diff --git a/recipes/packagekit/packagekit_0.5.1.bb b/recipes/packagekit/packagekit_0.5.1.bb
index 7a96a23..112f52a 100644
--- a/recipes/packagekit/packagekit_0.5.1.bb
+++ b/recipes/packagekit/packagekit_0.5.1.bb
@@ -9,9 +9,10 @@ inherit gnome autotools_stage
SRC_URI = "http://www.packagekit.org/releases/PackageKit-${PV}.tar.gz \
file://fix-segfaults-when-consolekit-is-missing.patch;patch=1 \
+ file://fix-segfault-when-hald-is-not-running.patch;patch=1 \
"
-PR = "r1"
+PR = "r2"
PE = "2"
S = "${WORKDIR}/PackageKit-${PV}"
--
1.6.3.3
More information about the Shr-devel
mailing list