aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/policykit
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2008-03-29 02:48:03 +0800
committermarcus <marcus@FreeBSD.org>2008-03-29 02:48:03 +0800
commit3ae898d079230c08603aa0eea01e0e4fb2b7a8f1 (patch)
treed871346a64d31ab051af7043ad9e38966067fc8e /sysutils/policykit
parent5df1cce1cc4c5a7d3bd236b70e55fb3f2f2341b3 (diff)
downloadfreebsd-ports-gnome-3ae898d079230c08603aa0eea01e0e4fb2b7a8f1.tar.gz
freebsd-ports-gnome-3ae898d079230c08603aa0eea01e0e4fb2b7a8f1.tar.zst
freebsd-ports-gnome-3ae898d079230c08603aa0eea01e0e4fb2b7a8f1.zip
Plug a small memory leak.
Diffstat (limited to 'sysutils/policykit')
-rw-r--r--sysutils/policykit/Makefile2
-rw-r--r--sysutils/policykit/files/patch-src_polkit_polkit-sysdeps.c11
2 files changed, 7 insertions, 6 deletions
diff --git a/sysutils/policykit/Makefile b/sysutils/policykit/Makefile
index 8d6c51a6f323..c89bd1d48633 100644
--- a/sysutils/policykit/Makefile
+++ b/sysutils/policykit/Makefile
@@ -8,7 +8,7 @@
PORTNAME= policykit
PORTVERSION= 0.7
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= sysutils gnome
MASTER_SITES= http://hal.freedesktop.org/releases/
DISTNAME= PolicyKit-${PORTVERSION}
diff --git a/sysutils/policykit/files/patch-src_polkit_polkit-sysdeps.c b/sysutils/policykit/files/patch-src_polkit_polkit-sysdeps.c
index c8e4935f105a..147cca500c46 100644
--- a/sysutils/policykit/files/patch-src_polkit_polkit-sysdeps.c
+++ b/sysutils/policykit/files/patch-src_polkit_polkit-sysdeps.c
@@ -1,5 +1,5 @@
--- src/polkit/polkit-sysdeps.c.orig 2007-11-28 16:26:14.000000000 -0500
-+++ src/polkit/polkit-sysdeps.c 2008-01-02 00:42:47.000000000 -0500
++++ src/polkit/polkit-sysdeps.c 2008-03-28 14:36:50.000000000 -0400
@@ -39,7 +39,6 @@
#include <grp.h>
#include <unistd.h>
@@ -20,7 +20,7 @@
if (filename == NULL) {
errno = ENOMEM;
goto out;
-@@ -93,6 +96,35 @@ polkit_sysdeps_get_start_time_for_pid (p
+@@ -93,6 +96,36 @@ polkit_sysdeps_get_start_time_for_pid (p
goto out;
}
@@ -37,6 +37,7 @@
+ kit_strfreev (tokens);
+
+ tokens = kit_strsplit (p, ',', &num_tokens);
++ kit_free (p);
+ if (tokens == NULL)
+ goto out;
+ if (num_tokens >= 1) {
@@ -56,7 +57,7 @@
/* start time is the 19th token after the '(process name)' entry */
p = strchr (contents, ')');
-@@ -118,6 +150,7 @@ polkit_sysdeps_get_start_time_for_pid (p
+@@ -118,6 +151,7 @@ polkit_sysdeps_get_start_time_for_pid (p
}
kit_strfreev (tokens);
@@ -64,7 +65,7 @@
out:
kit_free (filename);
-@@ -153,7 +186,11 @@ polkit_sysdeps_get_exe_for_pid (pid_t pi
+@@ -153,7 +187,11 @@ polkit_sysdeps_get_exe_for_pid (pid_t pi
ret = 0;
@@ -76,7 +77,7 @@
ret = readlink (proc_name, out_buf, buf_size - 1);
if (ret == -1) {
strncpy (out_buf, "(unknown)", buf_size);
-@@ -166,6 +203,108 @@ out:
+@@ -166,6 +204,108 @@ out:
return ret;
}