diff --git a/sys/src/cmd/upas/q/runq.c b/sys/src/cmd/upas/q/runq.c index e0dc777a9..67cad8414 100644 --- a/sys/src/cmd/upas/q/runq.c +++ b/sys/src/cmd/upas/q/runq.c @@ -151,12 +151,13 @@ doalldirs(void) long i, n; - if((fd = open(".", OREAD)) == -1) + if((fd = open(".", OREAD)) == -1){ warning("opening %s", root); return; } if((n = dirreadall(fd, &db)) == -1){ warning("reading %s: ", root); + close(fd); return; } for(i=0; i