aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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";
}
}