summaryrefslogtreecommitdiffstats
path: root/lib/utils_base.c
diff options
context:
space:
mode:
authorSven Nierlein <sven@nierlein.org>2018-10-22 14:22:54 (GMT)
committerGitHub <noreply@github.com>2018-10-22 14:22:54 (GMT)
commit82a634f7bfa433b78560be45ae6b52e1d101a26a (patch)
treea88f5203f1712e080c942e3ea4d4269e3392545b /lib/utils_base.c
parent1c0a48bc6bef8e69566bb4e272649c5a37a67f3a (diff)
parentc76f59bcc0b4c1a14caa7028e034ab44d3e1b4a8 (diff)
downloadmonitoring-plugins-82a634f7bfa433b78560be45ae6b52e1d101a26a.tar.gz
Merge pull request #1552 from madpilot78/Avoid_passing_NULL_to_vprintf
Avoid passing NULL to vprintf().
Diffstat (limited to 'lib/utils_base.c')
-rw-r--r--lib/utils_base.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/utils_base.c b/lib/utils_base.c
index 3822bcf..19a531f 100644
--- a/lib/utils_base.c
+++ b/lib/utils_base.c
@@ -87,10 +87,13 @@ void _get_monitoring_plugin( monitoring_plugin **pointer ){
87void 87void
88die (int result, const char *fmt, ...) 88die (int result, const char *fmt, ...)
89{ 89{
90 va_list ap; 90 if(fmt!=NULL) {
91 va_start (ap, fmt); 91 va_list ap;
92 vprintf (fmt, ap); 92 va_start (ap, fmt);
93 va_end (ap); 93 vprintf (fmt, ap);
94 va_end (ap);
95 }
96
94 if(this_monitoring_plugin!=NULL) { 97 if(this_monitoring_plugin!=NULL) {
95 np_cleanup(); 98 np_cleanup();
96 } 99 }