Merge pull request #1552 from madpilot78/Avoid_passing_NULL_to_vprintf

Avoid passing NULL to vprintf().
This commit is contained in:
Sven Nierlein 2018-10-22 16:22:54 +02:00 committed by GitHub
commit 82a634f7bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -87,10 +87,13 @@ void _get_monitoring_plugin( monitoring_plugin **pointer ){
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();
}