chiark / gitweb /
prefork-interp: fixes and tests
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 11 Aug 2022 19:32:49 +0000 (20:32 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 21 Aug 2022 20:21:10 +0000 (21:21 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
cprogs/prefork-interp.c

index 7e350870f872395aa92c8b9bb215737fc6309da0..916fdefcfad249bf932e3b68b6a60b38683f0c48 100644 (file)
@@ -304,7 +304,7 @@ static FILE *connect_existing(void) {
   return call_sock;
 
  x_garbage:
-  fclose(call_sock);
+  if (call_sock) fclose(call_sock);
   if (fd >= 0) close(fd);
   return 0;
 }