chiark / gitweb /
prefork-interp: fixes and tests
[chiark-utils.git] / 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;
 }