aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jonny007-MKD <nospam@jonny007-mkd.de> 2020-02-23 15:05:42 +0100
committerGravatar Sven Nierlein <sven@nierlein.org> 2021-09-02 09:56:39 +0200
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 0c10f09b..2f944f92 100644
--- a/plugins/check_dns.c
+++ b/plugins/check_dns.c
@@ -271,7 +271,7 @@ main (int argc, char **argv)
result = STATE_CRITICAL;
xasprintf(&msg, _("Domain '%s' was found by the server: '%s'\n"), query_address, address);
} else {
- if (address == NULL) free(address);
+ if (address != NULL) free(address);
address = "NXDOMAIN";
}
}