1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

Fix spurious crashes.

PR:		231801
Submitted by:	madpilot
This commit is contained in:
Mathieu Arnold 2018-10-03 08:09:59 +00:00
parent a44229b5cf
commit 27754cf3a7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=481146
2 changed files with 21 additions and 1 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= monitoring-plugins
PORTVERSION= 2.2
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= net-mgmt
MASTER_SITES= https://www.monitoring-plugins.org/download/ LOCAL/mat/${PORTNAME}

View File

@ -0,0 +1,20 @@
--- lib/utils_base.c.orig 2016-11-29 08:45:08 UTC
+++ lib/utils_base.c
@@ -87,10 +87,13 @@ void _get_monitoring_plugin( monitoring_
void
die (int result, const char *fmt, ...)
{
- va_list ap;
- va_start (ap, fmt);
- vprintf (fmt, ap);
- va_end (ap);
+ if(fmt!=NULL) {
+ va_list ap;
+ va_start (ap, fmt);
+ vprintf (fmt, ap);
+ va_end (ap);
+ }
+
if(this_monitoring_plugin!=NULL) {
np_cleanup();
}