Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Aug 2013 02:07:19 GMT
From:      Ken DEGUCHI <kdeguchi@sz.tokoha-u.ac.jp>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/181040: [patch] sysutils/conky "diskio" memory leak fix
Message-ID:  <201308050207.r7527Jec039541@oldred.freebsd.org>
Resent-Message-ID: <201308050210.r752A03v014979@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         181040
>Category:       ports
>Synopsis:       [patch] sysutils/conky "diskio" memory leak fix
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 05 02:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Ken DEGUCHI
>Release:        9.2-BETA2
>Organization:
TOKOHA University
>Environment:
FreeBSD lagrange.tokoha-u.ac.jp 9.2-BETA2 FreeBSD 9.2-BETA2 #94 r253757M: Mon Jul 29 16:13:02 JST 2013     root@lagrange.tokoha-u.ac.jp:/usr/obj/usr/src/sys/LAGRANGE  amd64
>Description:
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);

>How-To-Repeat:
When "diskio" variable is enabled, memory consumption is increased by about 8kB every second.
>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:

begin 644 patch-diskio.txt
M+2TM(&9I;&5S+W!A=&-H+7-R8RUF<F5E8G-D+F,N;W)I9PDR,#$S+3`R+3`Y
M(#`Y.C(R.C`Y+C4S,S,W.#DU,"`K,#DP,`HK*RL@9FEL97,O<&%T8V@M<W)C
M+69R965B<V0N8PDR,#$S+3`X+3`U(#`Y.C`S.C`V+C`P,#`P,#`P,"`K,#DP
M,`I`0"`M,2PU("LQ+#4@0$`*+2TM+2!S<F,O9G)E96)S9"YC+F]R:6<),C`Q
M,BTP-2TP-"`P,#HP.#HR-RXP,#`P,#`P,#`@*S`S,#`*+2LK*R!S<F,O9G)E
M96)S9"YC"3(P,3(M,3(M,#0@,3$Z,#DZ,C`N,#`P,#`P,#`P("LP,C`P"BLM
M+2T@<W)C+V9R965B<V0N8RYO<FEG"3(P,3(M,#4M,#0@,#8Z,#@Z,C<N,#`P
M,#`P,#`P("LP.3`P"BLK*RL@<W)C+V9R965B<V0N8PDR,#$S+3`X+3`U(#`Y
M.C`R.C,W+C`P,#`P,#`P,"`K,#DP,`H@0$`@+3,X+#8@*S,X+#$Q($!`"B`@
M(VEN8VQU9&4@/'-Y<R]T>7!E<RYH/@H@("-I;F-L=61E(#QS>7,O=7-E<BYH
M/@I`0"`M-3,L,R`K-3,L,3(@0$`*("`*("`):68@*"%G;&]B86Q?8W!U*2![
M"B`@"0EM86QL;V-?8W!U7W-I>F4@/2`H:6YF;RYC<'5?8V]U;G0@*R`Q*2`J
M('-I>F5O9BAS=')U8W0@8W!U7VEN9F\I.PHK0$`@+3<P,BPW("LW,#8L-R!`
M0`HK(`D)9G)E92AD979?<V5L96-T*3L**R`)?0HK(`HK+0EF<F5E*'-T871I
M;F9O7V-U<BYD:6YF;RD["BLK"69R964H<W1A=&EN9F]?8W5R+F1I;F9O+3YM
=96U?<'1R*3L**R`)<F5T=7)N(#`["BL@?0HK(`H`
`
end


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308050207.r7527Jec039541>