mk: fix closing random fd from uninitialized stack variable (thanks BurnZeZ, mycroftiv)
mycroftiv → this is practically "500 mile email" territory - the "6 letter mk bug"
This commit is contained in:
parent
1b619dea42
commit
27921a1ba0
1 changed files with 2 additions and 1 deletions
|
@ -199,7 +199,8 @@ execsh(char *args, char *cmd, Bufblock *buf, Envy *e)
|
|||
perror(shell);
|
||||
_exits("exec");
|
||||
}
|
||||
close(out[1]);
|
||||
if(buf)
|
||||
close(out[1]);
|
||||
close(in[0]);
|
||||
p = cmd+strlen(cmd);
|
||||
while(cmd < p){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue