Date: Wed, 10 Sep 2014 16:32:25 +0000 (UTC) From: Danilo Egea Gondolfo <danilo@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r367872 - in head/sysutils/xfce4-diskperf-plugin: . files Message-ID: <201409101632.s8AGWPs0056025@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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"); + }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409101632.s8AGWPs0056025>