brndnmtthws / conky

Light-weight system monitor for X, Wayland (sort of), and other things, too
https://conky.cc
GNU General Public License v3.0
7.17k stars 615 forks source link

FreeBSD $diskio memory fix #35

Closed kdeguchi closed 6 years ago

kdeguchi commented 10 years ago

In FreeBSD, memory leak is caused by $diskio related variables.

function "update_diskio" in src/freebsd.c

"free(statinfo_cur.dinfo);" is wrong.

"free(statinfo_cur.dinfo->mem_ptr);" is right.

rqcy commented 7 years ago

I can confirm that there is a leak related to diskio on FreeBSD.

Please fix. Thank you!

conky --version                                                                                                                                                                                           :0
conky 1.10.6 compiled Tue Dec 13 06:16:37 UTC 2016 for FreeBSD 11.0-RELEASE-p5 amd64

Compiled in features:

System config file: /etc/conky/conky.conf
Package library path: /usr/local/lib/conky

 General:
  * math
  * builtin default configuration
  * old configuration syntax
  * Internationalization support
 X11:
  * Xdamage extension
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual
  * Own window

 Default values:
  * Netdevice: eth0
  * Local configfile: $HOME/.conkyrc
  * Localedir: /usr/local/share/locale
  * Maximum netdevices: 64
  * Maximum text size: 16384
  * Size text buffer: 256
su8 commented 6 years ago

@lasers pinky-bar frees it (https://github.com/su8/pinky-bar/blob/master/src/freebsd_functions.c#L200), will do the changes right away.

su8 commented 6 years ago

Thank you for reporting, it has been fixed in https://github.com/brndnmtthws/conky/commit/a3b7905df65a1c5bafce65e42aac09fbef346bfe commit