]> granicus.if.org Git - pgbouncer/commitdiff
dns: fix failed lookup reporting.
authorMarko Kreen <markokr@gmail.com>
Mon, 8 Nov 2010 08:59:09 +0000 (10:59 +0200)
committerMarko Kreen <markokr@gmail.com>
Mon, 8 Nov 2010 08:59:09 +0000 (10:59 +0200)
src/dnslookup.c

index 40a2933167f15d18a38b0f47ee6deb60a5fd237c..0e9038e5cd97001b32d1a892ab1d40d051d30f7a 100644 (file)
@@ -327,7 +327,9 @@ loop:
        /* launch callback */
        log_noise("dns: deliver_info(%s) addr=%s", req->name,
                  sa2str(ai->ai_addr, sabuf, sizeof(sabuf)));
-       ucb->cb_func(ucb->cb_arg, ai->ai_addr, ai->ai_addrlen);
+       ucb->cb_func(ucb->cb_arg,
+                    ai ? ai->ai_addr : NULL,
+                    ai ? ai->ai_addrlen : 0);
        free(ucb);
 
        /* scroll req list */