summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorhe <he>2016-02-03 15:10:43 +0000
committerhe <he>2016-02-03 15:10:43 +0000
commitde76ddede9a24eea357641456683081fe502b38f (patch)
tree3ae0a363ab7c72f62cef6e223bcf441339147d55 /sysutils
parentac8e14704e3a02216bedc9e7b05f9ba53926f65a (diff)
downloadpkgsrc-de76ddede9a24eea357641456683081fe502b38f.tar.gz
Plug a memory leak in the irq NetBSD plugin, and avoid use of a
non-initialized stack variable in the same (code borrowed from NetBSD's vmstat, leak was of my own doing). Bump PKGREVISION.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/collectd/Makefile4
-rw-r--r--sysutils/collectd/distinfo4
-rw-r--r--sysutils/collectd/patches/patch-src_irq.c7
3 files changed, 8 insertions, 7 deletions
diff --git a/sysutils/collectd/Makefile b/sysutils/collectd/Makefile
index 5af21c40c25..4e9ecf533c7 100644
--- a/sysutils/collectd/Makefile
+++ b/sysutils/collectd/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.15 2016/02/03 13:10:27 he Exp $
+# $NetBSD: Makefile,v 1.16 2016/02/03 15:10:43 he Exp $
-PKGREVISION= 10
+PKGREVISION= 11
.include "../../sysutils/collectd/Makefile.common"
COMMENT= Statistics collection daemon base
diff --git a/sysutils/collectd/distinfo b/sysutils/collectd/distinfo
index 2f8679f969e..f10f9247709 100644
--- a/sysutils/collectd/distinfo
+++ b/sysutils/collectd/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.26 2016/02/03 13:10:27 he Exp $
+$NetBSD: distinfo,v 1.27 2016/02/03 15:10:43 he Exp $
SHA1 (collectd-5.5.0.tar.gz) = d24e284c1eae20c5e75b846c8b2612ab65bd5565
RMD160 (collectd-5.5.0.tar.gz) = 2197758942a5fe56e4eabda3786f09d4138e943a
@@ -17,7 +17,7 @@ SHA1 (patch-src_cpu.c) = 55b5cfc69bf0df279d1a12003eb6a8e681155e18
SHA1 (patch-src_df.c) = 7e75dfbc72ecad48eb0eb7427a19329daf6b9a60
SHA1 (patch-src_disk.c) = 159862e8ca1e841e3c4013c03ba03f059fdbbab5
SHA1 (patch-src_entropy.c) = 4fa683654936f57fb7366faebb93d572af08db9c
-SHA1 (patch-src_irq.c) = 6b621474de35a5879105025d1a2848e4896b8479
+SHA1 (patch-src_irq.c) = 8d5c516fea31bf2ab9736c32540be3223dea15d9
SHA1 (patch-src_libcollectclient_network__buffer.c) = e07d403d299613fa0885a0e7285849eb85510253
SHA1 (patch-src_memory.c) = f48d50245176426e26af7fa1b1f4ff6fbf0b1d95
SHA1 (patch-src_netstat__udp.c) = 30cb12d25f56c60959658dbd181783212e00cc61
diff --git a/sysutils/collectd/patches/patch-src_irq.c b/sysutils/collectd/patches/patch-src_irq.c
index 6ae89ea4cfa..60210423f4e 100644
--- a/sysutils/collectd/patches/patch-src_irq.c
+++ b/sysutils/collectd/patches/patch-src_irq.c
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_irq.c,v 1.1 2015/08/18 07:47:46 he Exp $
+$NetBSD: patch-src_irq.c,v 1.2 2016/02/03 15:10:43 he Exp $
Provide a port to NetBSD.
@@ -36,7 +36,7 @@ Provide a port to NetBSD.
static int irq_read (void)
{
FILE *fh;
-@@ -183,6 +196,63 @@ static int irq_read (void)
+@@ -183,6 +196,64 @@ static int irq_read (void)
return (0);
} /* int irq_read */
@@ -60,6 +60,7 @@ Provide a port to NetBSD.
+ size_t newlen;
+ int error;
+
++ newlen = buflen;
+ if (buflen)
+ buf = malloc(buflen);
+ error = sysctl(mib, __arraycount(mib),
@@ -93,7 +94,7 @@ Provide a port to NetBSD.
+ buflen -= evs->ev_len;
+ evs =(const void*)((const uint64_t *)evs + evs->ev_len);
+ }
-+
++ free(buf);
+ return 0;
+}
+#endif /* KERNEL_NETBSD */