summaryrefslogtreecommitdiffstats
path: root/sysutils/upower
diff options
context:
space:
mode:
authormarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2010-04-12 07:54:19 +0800
committermarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2010-04-12 07:54:19 +0800
commit138eb1d4a29eb7d4e59a12fbc3490cf68bc6691c (patch)
treec405aee938b098582358adfe8634c3afc87772eb /sysutils/upower
parent0ec65e7a2aaabf2f979aec9a9cf73c1578bd5eb4 (diff)
downloadmarcuscom-ports-138eb1d4a29eb7d4e59a12fbc3490cf68bc6691c.tar
marcuscom-ports-138eb1d4a29eb7d4e59a12fbc3490cf68bc6691c.tar.gz
marcuscom-ports-138eb1d4a29eb7d4e59a12fbc3490cf68bc6691c.tar.bz2
marcuscom-ports-138eb1d4a29eb7d4e59a12fbc3490cf68bc6691c.tar.lz
marcuscom-ports-138eb1d4a29eb7d4e59a12fbc3490cf68bc6691c.tar.xz
marcuscom-ports-138eb1d4a29eb7d4e59a12fbc3490cf68bc6691c.tar.zst
marcuscom-ports-138eb1d4a29eb7d4e59a12fbc3490cf68bc6691c.zip
Don't try and access free'd memory.
Reported by: kwm git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@14039 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'sysutils/upower')
-rw-r--r--sysutils/upower/Makefile4
-rw-r--r--sysutils/upower/files/patch-src_up-daemon.c20
2 files changed, 22 insertions, 2 deletions
diff --git a/sysutils/upower/Makefile b/sysutils/upower/Makefile
index bea0b71ed..35af259b0 100644
--- a/sysutils/upower/Makefile
+++ b/sysutils/upower/Makefile
@@ -3,12 +3,12 @@
# Whom: Joe Marcus Clarke <marcus@FreeBSD.org>
#
# $FreeBSD$
-# $MCom: ports/sysutils/upower/Makefile,v 1.12 2010/04/06 22:53:43 marcus Exp $
+# $MCom: ports/sysutils/upower/Makefile,v 1.13 2010/04/09 06:52:55 marcus Exp $
#
PORTNAME= upower
DISTVERSION= 0.9.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= sysutils
MASTER_SITES= http://upower.freedesktop.org/releases/
diff --git a/sysutils/upower/files/patch-src_up-daemon.c b/sysutils/upower/files/patch-src_up-daemon.c
new file mode 100644
index 000000000..7ddaae8c4
--- /dev/null
+++ b/sysutils/upower/files/patch-src_up-daemon.c
@@ -0,0 +1,20 @@
+--- src/up-daemon.c.orig 2010-04-11 19:51:10.000000000 -0400
++++ src/up-daemon.c 2010-04-11 19:51:33.000000000 -0400
+@@ -480,6 +480,8 @@ up_daemon_suspend_allowed (UpDaemon *dae
+ goto out;
+
+ ret = up_polkit_is_allowed (daemon->priv->polkit, subject, "org.freedesktop.upower.suspend", context);
++ if (!ret)
++ goto out;
+ dbus_g_method_return (context, ret);
+
+ out:
+@@ -564,6 +566,8 @@ up_daemon_hibernate_allowed (UpDaemon *d
+ goto out;
+
+ ret = up_polkit_is_allowed (daemon->priv->polkit, subject, "org.freedesktop.upower.hibernate", context);
++ if (!ret)
++ goto out;
+ dbus_g_method_return (context, ret);
+
+ out: