Errorcheck library call
authorJeremy Harris <jgh146exb@wizmail.org>
Wed, 8 Dec 2021 13:13:44 +0000 (13:13 +0000)
committerJeremy Harris <jgh146exb@wizmail.org>
Wed, 8 Dec 2021 13:13:44 +0000 (13:13 +0000)
src/src/lookups/readsock.c

index 06058ed17792757d72cdc5b8a42c46116721f831..61f7296188972b71bd22b8d98ad010328b26c156 100644 (file)
@@ -256,6 +256,11 @@ if (!cctx->tls_ctx)
 #endif
   {
   FILE * fp = fdopen(cctx->sock, "rb");
+  if (!fp)
+    {
+    log_write(0, LOG_MAIN|LOG_PANIC, "readsock fdopen: %s\n", strerror(errno));
+    goto out;
+    }
   ALARM(timeout);
   yield = cat_file(fp, NULL, eol);
   }