summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorJonny007-MKD <nospam@jonny007-mkd.de>2020-02-23 15:05:42 +0100
committerSven Nierlein <sven@nierlein.org>2021-09-02 09:56:39 +0200
commit2056c5853175e6ad0e041ff3776e10d9e612b521 (patch)
tree148b85219d249c38f26d315374bc763ecbd7c4de /plugins
parent70f55ca9db87f639856e0548a57081c886e09d14 (diff)
downloadmonitoring-plugins-2056c58.tar.gz
check_dns: Fix memory leak
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_dns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/check_dns.c b/plugins/check_dns.c
index 0c10f09b..2f944f92 100644
--- a/plugins/check_dns.c
+++ b/plugins/check_dns.c
@@ -271,7 +271,7 @@ main (int argc, char **argv)
271 result = STATE_CRITICAL; 271 result = STATE_CRITICAL;
272 xasprintf(&msg, _("Domain '%s' was found by the server: '%s'\n"), query_address, address); 272 xasprintf(&msg, _("Domain '%s' was found by the server: '%s'\n"), query_address, address);
273 } else { 273 } else {
274 if (address == NULL) free(address); 274 if (address != NULL) free(address);
275 address = "NXDOMAIN"; 275 address = "NXDOMAIN";
276 } 276 }
277 } 277 }