Start upgrade to darkstat-3.0.719.
[darkstat-debian] / dns.c
diff --git a/dns.c b/dns.c
index 5b6d95b..163aa56 100644 (file)
--- a/dns.c
+++ b/dns.c
@@ -8,6 +8,7 @@
  */
 
 #include "cdefs.h"
+#include "cap.h"
 #include "conv.h"
 #include "decode.h"
 #include "dns.h"
@@ -65,8 +66,9 @@ dns_init(const char *privdrop_user)
       daemonize_finish(); /* drop our copy of the lifeline! */
       if (signal(SIGUSR1, SIG_IGN) == SIG_ERR)
          errx(1, "signal(SIGUSR1, ignore) failed");
+      cap_free_args();
       dns_main();
-      exit(0);
+      errx(1, "DNS child fell out of dns_main()");
    } else {
       /* We are the parent. */
       close(dns_sock[CHILD]);
@@ -375,7 +377,7 @@ dns_main(void)
                                  host, sizeof(host), NULL, 0, flags);
                break;
             default:
-               ret = EAI_FAMILY;
+               errx(1, "unexpected ip.family = %d", ip.family);
          }
 
          if (ret != 0) {