Forgot to check in xfdopen(). My bad.

Failure of fdopen() is most likely failure of malloc() for the FILE structure.
diff --git a/lib/lib.h b/lib/lib.h
index 98f4aad..f66a70c 100644
--- a/lib/lib.h
+++ b/lib/lib.h
@@ -106,6 +106,7 @@
 int xopen(char *path, int flags);
 void xclose(int fd);
 int xdup(int fd);
+FILE *xfdopen(int fd, char *mode);
 FILE *xfopen(char *path, char *mode);
 size_t xread(int fd, void *buf, size_t len);
 void xreadall(int fd, void *buf, size_t len);