summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonny007-MKD <nospam@jonny007-mkd.de>2020-02-23 14:05:42 (GMT)
committerSven Nierlein <sven@nierlein.org>2021-09-02 07:56:39 (GMT)
commit2056c5853175e6ad0e041ff3776e10d9e612b521 (patch)
tree148b85219d249c38f26d315374bc763ecbd7c4de
parent70f55ca9db87f639856e0548a57081c886e09d14 (diff)
downloadmonitoring-plugins-2056c5853175e6ad0e041ff3776e10d9e612b521.tar.gz
check_dns: Fix memory leak
-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 0c10f09..2f944f9 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 }