lib9p: fix listensrv() filedescriptor leaks

This commit is contained in:
cinap_lenrek 2019-10-04 18:52:53 +02:00
parent 2401794cff
commit dea2905783

View file

@ -44,11 +44,13 @@ listenproc(void *v)
break;
}
data = accept(ctl, ndir);
data = accept(nctl, ndir);
if(data < 0){
fprint(2, "%s: accept %s: %r\n", argv0, ndir);
close(nctl);
continue;
}
close(nctl);
s = emalloc9p(sizeof *s);
*s = *os;