ref: 7708988076d1f25a1165cdd88e131480954387d0
parent: 7a447151ae273bf08e596f57b7b9aaa1de11da33
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Jan 5 12:52:36 EST 2025
htmlroff: fix tcs pipe leak
--- a/sys/src/cmd/htmlroff/char.c
+++ b/sys/src/cmd/htmlroff/char.c
@@ -33,14 +33,15 @@
sysfatal("fork: %r");
case 0:
dup(p[0], 0);
- dup(p[1], 1);
+ dup(p[0], 1);
close(p[0]);
close(p[1]);
execl("/bin/tcs", "tcs", "-t", "html", nil);
_exits(0);
default:
+ close(p[0]);
fd = p[1];
- Binit(&b, p[0], OREAD);
+ Binit(&b, fd, OREAD);
break;
}
}
--
⑨