From 2056c5853175e6ad0e041ff3776e10d9e612b521 Mon Sep 17 00:00:00 2001 From: Jonny007-MKD Date: Sun, 23 Feb 2020 15:05:42 +0100 Subject: check_dns: Fix memory leak --- plugins/check_dns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"; } } -- cgit v1.2.3-74-g34f1