diff options
author | kwm <kwm@FreeBSD.org> | 2010-05-14 03:43:05 +0800 |
---|---|---|
committer | kwm <kwm@FreeBSD.org> | 2010-05-14 03:43:05 +0800 |
commit | f2ebf08e338fae5bad28770e4def9facb9d404c0 (patch) | |
tree | 45d189e25e62c5d48dfee6b255eeb50bf705754c /x11 | |
parent | a182afd71455ccdcccc3bda66349dfcadd53fb20 (diff) | |
download | freebsd-ports-gnome-f2ebf08e338fae5bad28770e4def9facb9d404c0.tar.gz freebsd-ports-gnome-f2ebf08e338fae5bad28770e4def9facb9d404c0.tar.zst freebsd-ports-gnome-f2ebf08e338fae5bad28770e4def9facb9d404c0.zip |
Fix some memory leaks in the cpufreq applet.
PR: ports/146033
Submitted by: Bryan Venteicher <bryanv@daemoninthecloset.org>
Diffstat (limited to 'x11')
-rw-r--r-- | x11/gnome-applets/Makefile | 1 | ||||
-rw-r--r-- | x11/gnome-applets/files/patch-cpufreq-freebsd | 14 |
2 files changed, 12 insertions, 3 deletions
diff --git a/x11/gnome-applets/Makefile b/x11/gnome-applets/Makefile index b4ef495ae345..0e7ac305bf96 100644 --- a/x11/gnome-applets/Makefile +++ b/x11/gnome-applets/Makefile @@ -8,6 +8,7 @@ PORTNAME= gnome-applets PORTVERSION= 2.30.0 +PORTREVISION= 1 CATEGORIES= x11 gnome MASTER_SITES= GNOME DIST_SUBDIR= gnome2 diff --git a/x11/gnome-applets/files/patch-cpufreq-freebsd b/x11/gnome-applets/files/patch-cpufreq-freebsd index a597e6725bd0..15e75f5340bd 100644 --- a/x11/gnome-applets/files/patch-cpufreq-freebsd +++ b/x11/gnome-applets/files/patch-cpufreq-freebsd @@ -217,9 +217,9 @@ void cpufreq_utils_display_error (const gchar *message, ---- cpufreq/src/cpufreq-monitor-sysctl.c.orig Wed Feb 28 14:03:58 2007 -+++ cpufreq/src/cpufreq-monitor-sysctl.c Wed Feb 28 14:28:47 2007 -@@ -0,0 +1,176 @@ +--- cpufreq/src/cpufreq-monitor-sysctl.c.orig 2010-05-13 11:27:57.000000000 +0200 ++++ cpufreq/src/cpufreq-monitor-sysctl.c 2010-05-13 11:36:13.000000000 +0200 +@@ -0,0 +1,184 @@ +/* + * Copyright (C) 2001, 2002 Free Software Foundation + * @@ -305,6 +305,9 @@ + fmax = atoi ((gchar *) list->data); + fmin = atoi ((gchar *) g_list_nth_data (list, (g_list_length (list) - 1))); + ++ g_list_foreach (list, (GFunc) g_free, NULL); ++ g_list_free (list); ++ + g_object_get (G_OBJECT (monitor), "cpu", &mon_cpu, NULL); + len = sizeof (ifreq); + freq_oid = g_strdup_printf ("dev.cpu.%d.freq", 0); @@ -330,6 +333,8 @@ + "max-frequency", fmax, + NULL); + ++ g_free (governer); ++ + return TRUE; +} + @@ -357,7 +362,10 @@ + + levels = g_malloc (len); + if (sysctl (mib, 4, levels, &len, NULL, 0) == -1) ++ { ++ g_free(levels); + return NULL; ++ } + + levelsp = g_strsplit (levels, " ", 0); + g_free (levels); |