Tried contacting upstream, but no response from there. This patch
prevents NULL being passed to freeaddrinfo()
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/btpd/Makefile,v
retrieving revision 1.6
diff -N -u -p Makefile
--- Makefile 12 Feb 2009 12:27:35 -0000 1.6
+++ Makefile 19 Nov 2009 03:51:30 -0000
@@ -3,6 +3,7 @@
COMMENT= BitTorrent Protocol Daemon
DISTNAME= btpd-0.15
+PKGNAME= ${DISTNAME}p0
CATEGORIES= net
MAINTAINER= Martin Cronier <[email protected]>
Index: patches/patch-btpd_addrinfo_c
===================================================================
RCS file: patches/patch-btpd_addrinfo_c
diff -N -u -p patches/patch-btpd_addrinfo_c
--- /dev/null 18 Nov 2009 20:51:30 -0000
+++ patches/patch-btpd_addrinfo_c 19 Nov 2009 03:51:30 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- btpd/addrinfo.c.orig Wed Aug 5 12:18:57 2009
++++ btpd/addrinfo.c Wed Aug 5 12:19:42 2009
+@@ -52,7 +52,7 @@ addrinfo_td_cb(void *arg)
+ struct ai_ctx *ctx = arg;
+ if (!ctx->cancel)
+ ctx->cb(ctx->arg, ctx->error, ctx->res);
+- else if (ctx->error != 0)
++ else if ((ctx->error != 0) && (ctx->res != NULL))
+ freeaddrinfo(ctx->res);
+ free(ctx);
+ }