pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/nagios-plugins Remove some broken malloc logic fro...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d4df3cd1aabe
branches:  trunk
changeset: 543195:d4df3cd1aabe
user:      tonnerre <tonnerre%pkgsrc.org@localhost>
date:      Sun Jun 08 14:08:47 2008 +0000

description:
Remove some broken malloc logic from the nagios-plugins library.
Discovered and patch provided by Wolfgang Solfrank.

diffstat:

 net/nagios-plugins/Makefile         |   3 ++-
 net/nagios-plugins/distinfo         |   3 ++-
 net/nagios-plugins/patches/patch-aa |  26 ++++++++++++++++++++++++++
 3 files changed, 30 insertions(+), 2 deletions(-)

diffs (59 lines):

diff -r 2cf149ad5c06 -r d4df3cd1aabe net/nagios-plugins/Makefile
--- a/net/nagios-plugins/Makefile       Sun Jun 08 13:47:41 2008 +0000
+++ b/net/nagios-plugins/Makefile       Sun Jun 08 14:08:47 2008 +0000
@@ -1,9 +1,10 @@
-# $NetBSD: Makefile,v 1.14 2008/05/27 21:22:03 tonnerre Exp $
+# $NetBSD: Makefile,v 1.15 2008/06/08 14:08:47 tonnerre Exp $
 #
 
 CATEGORIES=    net sysutils
 
 MAINTAINER=    tonnerre%NetBSD.org@localhost
+PKGREVISION=   1
 HOMEPAGE=      http://sourceforge.net/projects/nagiosplug/
 COMMENT=       Nagios plugins
 
diff -r 2cf149ad5c06 -r d4df3cd1aabe net/nagios-plugins/distinfo
--- a/net/nagios-plugins/distinfo       Sun Jun 08 13:47:41 2008 +0000
+++ b/net/nagios-plugins/distinfo       Sun Jun 08 14:08:47 2008 +0000
@@ -1,8 +1,9 @@
-$NetBSD: distinfo,v 1.6 2008/05/27 21:22:03 tonnerre Exp $
+$NetBSD: distinfo,v 1.7 2008/06/08 14:08:47 tonnerre Exp $
 
 SHA1 (nagios-plugins-1.4.11.tar.gz) = bc91a57ad6f5468b17f24429ba25225cfff45d59
 RMD160 (nagios-plugins-1.4.11.tar.gz) = 4f33e796f8eac2d8d13cbecbcc1191857e1b5f15
 Size (nagios-plugins-1.4.11.tar.gz) = 1734230 bytes
+SHA1 (patch-aa) = 9097c99ecb20b1e12099a9bae77b6d38ed76c331
 SHA1 (patch-ab) = aaa6938dd165cf348e798e02c34ee82a86eedf7c
 SHA1 (patch-ad) = edf12abc20e8dfe4095e4515c27046579639d1ae
 SHA1 (patch-ae) = 775fc9d8c25eec6050d709e8a377c8deb17bcf66
diff -r 2cf149ad5c06 -r d4df3cd1aabe net/nagios-plugins/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/nagios-plugins/patches/patch-aa       Sun Jun 08 14:08:47 2008 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-aa,v 1.3 2008/06/08 14:08:47 tonnerre Exp $
+
+--- lib/utils_base.c.orig      2007-07-29 14:42:05.000000000 +0200
++++ lib/utils_base.c
+@@ -89,7 +89,7 @@ _set_thresholds(thresholds **my_threshol
+ {
+       thresholds *temp_thresholds = NULL;
+ 
+-      temp_thresholds = malloc(sizeof(temp_thresholds));
++      temp_thresholds = malloc(sizeof(*temp_thresholds));
+ 
+       temp_thresholds->warning = NULL;
+       temp_thresholds->critical = NULL;
+@@ -105,10 +105,9 @@ _set_thresholds(thresholds **my_threshol
+               }
+       }
+ 
+-      if (*my_thresholds > 0) {       /* Not sure why, but sometimes could be -1 */
+-              /* printf("Freeing here: %d\n", *my_thresholds); */
++      if (*my_thresholds)
+               free(*my_thresholds);
+-      }
++
+       *my_thresholds = temp_thresholds;
+ 
+       return 0;



Home | Main Index | Thread Index | Old Index