From: Marko Kreen Date: Sat, 19 Mar 2011 21:57:14 +0000 (+0200) Subject: dnslookup: Fix crash when log_noise() is turned on X-Git-Tag: pgbouncer_1_4_1_rc2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4434296d0259b65c105e75780c9a3af3cb5235da;p=pgbouncer dnslookup: Fix crash when log_noise() is turned on --- diff --git a/src/dnslookup.c b/src/dnslookup.c index 76e3acf..a550ca6 100644 --- a/src/dnslookup.c +++ b/src/dnslookup.c @@ -335,7 +335,7 @@ loop: /* launch callback */ log_noise("dns: deliver_info(%s) addr=%s", req->name, - sa2str(ai->ai_addr, sabuf, sizeof(sabuf))); + ai ? sa2str(ai->ai_addr, sabuf, sizeof(sabuf)) : "NULL"); ucb->cb_func(ucb->cb_arg, ai ? ai->ai_addr : NULL, ai ? ai->ai_addrlen : 0);