From 4a72dc4f0d6bb2b1a906394d08e931ed2df8e89e Mon Sep 17 00:00:00 2001
From: Marek Vavrusa <marek.vavrusa@nic.cz>
Date: Mon, 13 Aug 2012 13:31:53 +0200
Subject: [PATCH] Missing #ifdef debug guard, would probably get optimized
 away, but still.

---
 src/knot/server/zones.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/knot/server/zones.c b/src/knot/server/zones.c
index a0ae6025a5..8f607bf676 100644
--- a/src/knot/server/zones.c
+++ b/src/knot/server/zones.c
@@ -2620,12 +2620,13 @@ static int zones_find_zone_for_xfr(const knot_zone_contents_t *zone,
 			return KNOTD_EOK;
 		}
 	}
-
+#ifdef KNOTD_ZONES_DEBUG
 	char *name = knot_dname_to_str(knot_node_owner(
 	                 knot_zone_contents_apex(zone)));
 	dbg_zones("zones: no zone found for the zone received by transfer "
 	          "(%s).\n", name);
 	free(name);
+#endif
 
 	return KNOTD_ENOENT;
 }
-- 
GitLab