Conky has a memory leak related to "diskio". When "diskio" variable is enabled, memory consumption is increased by about 8kB every second. This is caused by "free" the wrong pointer in the function update_diskio in "src/freebsd.c". This attached patch is modified to free the correct pointer as follows. free(statinfo_cur.dinfo); -> free(statinfo_cur.dinfo->mem_ptr); Fix: This attached patch is modified to free the correct pointer as follows. free(statinfo_cur.dinfo); -> free(statinfo_cur.dinfo->mem_ptr); Patch attached with submission follows: How-To-Repeat: When "diskio" variable is enabled, memory consumption is increased by about 8kB every second.
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Maintainer of sysutils/conky, Please note that PR ports/181040 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/181040 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org
conky "diskio" memory leak in FreeBSD. Please commit this patch.
Responsible Changed From-To: freebsd-ports-bugs->jhale I'll take it.
Author: jhale Date: Fri Mar 28 09:35:19 2014 New Revision: 349402 URL: http://svnweb.freebsd.org/changeset/ports/349402 QAT: https://qat.redports.org/buildarchive/r349402/ Log: - Add patch to fix diskio memory leak - Bump PORTREVISION While here: - Convert USE_BZIP2 -> USES PR: ports/181040 Submitted by: Ken DEGUCHI <kdeguchi@sz.tokoha-u.ac.jp> Approved by: maintainer timeout (~8 months) Modified: head/sysutils/conky/Makefile head/sysutils/conky/files/patch-src-freebsd.c Modified: head/sysutils/conky/Makefile ============================================================================== --- head/sysutils/conky/Makefile Fri Mar 28 09:23:08 2014 (r349401) +++ head/sysutils/conky/Makefile Fri Mar 28 09:35:19 2014 (r349402) @@ -3,7 +3,7 @@ PORTNAME= conky PORTVERSION= 1.9.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= sysutils MASTER_SITES= SF @@ -13,8 +13,7 @@ COMMENT?= Advanced, highly configurable CONFLICTS?= conky-awesome-[0-9]* SLAVEDIRS= sysutils/conky-awesome -USES= gmake iconv pkgconfig -USE_BZIP2= yes +USES= gmake iconv pkgconfig tar:bzip2 GNU_CONFIGURE= yes CONFIGURE_ARGS+= --disable-portmon \ --disable-hddtemp \ Modified: head/sysutils/conky/files/patch-src-freebsd.c ============================================================================== --- head/sysutils/conky/files/patch-src-freebsd.c Fri Mar 28 09:23:08 2014 (r349401) +++ head/sysutils/conky/files/patch-src-freebsd.c Fri Mar 28 09:35:19 2014 (r349402) @@ -1,5 +1,5 @@ ---- src/freebsd.c.orig 2012-05-04 00:08:27.000000000 +0300 -+++ src/freebsd.c 2012-12-04 11:09:20.000000000 +0200 +--- src/freebsd.c.orig 2012-05-04 06:08:27.000000000 +0900 ++++ src/freebsd.c 2013-08-05 09:02:37.000000000 +0900 @@ -38,6 +38,11 @@ #include <sys/types.h> #include <sys/user.h> @@ -53,3 +53,12 @@ if (!global_cpu) { malloc_cpu_size = (info.cpu_count + 1) * sizeof(struct cpu_info); +@@ -702,7 +706,7 @@ + free(dev_select); + } + +- free(statinfo_cur.dinfo); ++ free(statinfo_cur.dinfo->mem_ptr); + return 0; + } + _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
State Changed From-To: feedback->closed Committed. Thanks!