confine pthreads to pthread.c
diff --git a/src/libthread/channel.c b/src/libthread/channel.c
index 3c9614e..c8c9679 100644
--- a/src/libthread/channel.c
+++ b/src/libthread/channel.c
@@ -22,6 +22,8 @@
 	Channel *c;
 
 	c = malloc(sizeof *c+bufsize*elemsize);
+	if(c == nil)
+		sysfatal("chancreate malloc: %r");
 	memset(c, 0, sizeof *c);
 	c->elemsize = elemsize;
 	c->bufsize = bufsize;