svn commit: r367872 - in head/sysutils/xfce4-diskperf-plugin: . files
Danilo Egea Gondolfo
danilo at FreeBSD.org
Wed Sep 10 16:32:25 UTC 2014
Author: danilo
Date: Wed Sep 10 16:32:24 2014
New Revision: 367872
URL: http://svnweb.freebsd.org/changeset/ports/367872
QAT: https://qat.redports.org/buildarchive/r367872/
Log:
- Fix a memory leak due a improper memset
Modified:
head/sysutils/xfce4-diskperf-plugin/Makefile
head/sysutils/xfce4-diskperf-plugin/files/patch-panel-plugin__devperf.c
Modified: head/sysutils/xfce4-diskperf-plugin/Makefile
==============================================================================
--- head/sysutils/xfce4-diskperf-plugin/Makefile Wed Sep 10 16:15:09 2014 (r367871)
+++ head/sysutils/xfce4-diskperf-plugin/Makefile Wed Sep 10 16:32:24 2014 (r367872)
@@ -3,7 +3,7 @@
PORTNAME= xfce4-diskperf-plugin
PORTVERSION= 2.5.4
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= sysutils xfce
MASTER_SITES= ${MASTER_SITE_XFCE}
MASTER_SITE_SUBDIR= src/panel-plugins/${PORTNAME}/${PORTVERSION:R}
Modified: head/sysutils/xfce4-diskperf-plugin/files/patch-panel-plugin__devperf.c
==============================================================================
--- head/sysutils/xfce4-diskperf-plugin/files/patch-panel-plugin__devperf.c Wed Sep 10 16:15:09 2014 (r367871)
+++ head/sysutils/xfce4-diskperf-plugin/files/patch-panel-plugin__devperf.c Wed Sep 10 16:32:24 2014 (r367872)
@@ -1,6 +1,6 @@
---- ./panel-plugin/devperf.c.orig 2012-04-03 10:22:41.000000000 -0300
-+++ ./panel-plugin/devperf.c 2013-09-11 17:45:00.000000000 -0300
-@@ -225,6 +225,94 @@
+--- panel-plugin/devperf.c.orig 2012-04-03 13:22:41 UTC
++++ panel-plugin/devperf.c
+@@ -225,6 +225,93 @@
/************************** Linux End ***************/
@@ -22,8 +22,13 @@
+
+#define MAXNAMELEN 256
+
++struct statinfo stats;
++struct devinfo dinfo;
++
+int DevPerfInit ()
+{
++ stats.dinfo = &dinfo;
++
+ return (0);
+}
+
@@ -36,17 +41,11 @@
+{
+ struct timeval tv;
+ struct timespec ts;
-+ struct statinfo stats;
-+ struct devinfo dinfo;
+ struct devstat dev;
+ kvm_t *kd = NULL;
+ int i, found = 0;
+ char *check_dev = (char *) p_pvDevice;
+
-+ memset(&stats, 0, sizeof(stats));
-+ memset(&dinfo, 0, sizeof(dinfo));
-+ stats.dinfo = &dinfo;
-+
+ if(devstat_getdevs(kd, &stats) == -1) {
+ syslog(0, "DISKPERF: getdevs fail");
+ }
More information about the svn-ports-all
mailing list