ports/146033: x11/gnome-applets: cpufreq-applet memory leak [PATCH]

Bryan Venteicher bryanv at daemoninthecloset.org
Mon May 3 03:10:13 UTC 2010


The following reply was made to PR ports/146033; it has been noted by GNATS.

From: Bryan Venteicher <bryanv at daemoninthecloset.org>
To: mezz at FreeBSD.org, bug-followup at FreeBSD.org, bryanv at daemoninthecloset.org
Cc: mezz at FreeBSD.org
Subject: Re: ports/146033: x11/gnome-applets: cpufreq-applet memory leak
 [PATCH]
Date: Sun, 2 May 2010 21:45:11 -0500 (CDT)

 ------=_Part_7_278908925.1272854711403
 Content-Type: text/plain; charset=utf-8
 Content-Transfer-Encoding: 7bit
 
 
 
 ----- Original Message -----
 From: mezz at FreeBSD.org
 To: bryanv at daemoninthecloset.org, mezz at FreeBSD.org, gnome at FreeBSD.org
 Sent: Tuesday, April 27, 2010 9:52:50 PM
 Subject: Re: ports/146033: x11/gnome-applets: cpufreq-applet memory leak [PATCH]
 
 Synopsis: x11/gnome-applets: cpufreq-applet memory leak [PATCH]
 
 State-Changed-From-To: open->feedback
 State-Changed-By: mezz
 State-Changed-When: Wed Apr 28 02:52:32 UTC 2010
 State-Changed-Why: Please resend patch, but actually attach in the email
 this time. Look at
 here: http://www.freebsd.org/cgi/query-pr.cgi?pr=146033 As you can see,
 it is impossible for us to copy and paste or download the attach from
 the PR.
 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=146033
 
 ------=_Part_7_278908925.1272854711403
 Content-Type: text/x-patch; name=cpufreq.diff
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment; filename=cpufreq.diff
 
 --- a/files/patch-cpufreq-freebsd	2010-04-25 00:24:34.700967984 -0500
 +++ b/files/patch-cpufreq-freebsd	2010-04-25 00:24:47.166172634 -0500
 @@ -219,7 +219,7 @@
   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 @@
 +@@ -0,0 +1,185 @@
  +/*
  + * 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);
 @@ -314,6 +317,8 @@
  +	       		 return FALSE;
  +	   }
  +
 ++	   g_free (freq_oid);
 ++
  +	   ifreq *= 1000;
  +
  +	   if (ifreq == fmax)
 @@ -330,6 +335,8 @@
  +			 "max-frequency", fmax,
  +			 NULL);
  +
 ++	   g_free (governor);
 ++
  +	   return TRUE;
  +}
  +
 @@ -356,8 +363,10 @@
  +			 return NULL;
  +
  +	   levels = g_malloc (len);
 -+	   if (sysctl (mib, 4, levels, &len, NULL, 0) == -1)
 ++	   if (sysctl (mib, 4, levels, &len, NULL, 0) == -1) {
 ++			 g_free (levels);
  +	       		 return NULL;
 ++	   }
  +
  +	   levelsp = g_strsplit (levels, " ", 0);
  +	   g_free (levels);
 
 
 ------=_Part_7_278908925.1272854711403--


More information about the freebsd-gnome mailing list