aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/core.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-01-30 19:45:08 +0000
committerrsc <devnull@localhost>2005-01-30 19:45:08 +0000
commit98e19d6df6ecb636f85d11a52065a5f6c51c1ad9 (patch)
treed0888deec52c4ebc00177d42bc9779faa62c3572 /src/cmd/core.c
parent6bc22c7d87df65a5fc380cbaf67c5e5a6456a2de (diff)
downloadplan9port-98e19d6df6ecb636f85d11a52065a5f6c51c1ad9.tar.gz
plan9port-98e19d6df6ecb636f85d11a52065a5f6c51c1ad9.tar.bz2
plan9port-98e19d6df6ecb636f85d11a52065a5f6c51c1ad9.zip
do not readdir files - from zoltan jarai
Diffstat (limited to 'src/cmd/core.c')
-rw-r--r--src/cmd/core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cmd/core.c b/src/cmd/core.c
index a0021a0a..be3fe8ae 100644
--- a/src/cmd/core.c
+++ b/src/cmd/core.c
@@ -68,8 +68,11 @@ coreall(char *name)
fprint(2, "%s: %r\n", name);
return;
}
- if((d->mode&DMDIR) == 0)
+ if((d->mode&DMDIR) == 0){
+ free(d);
corefile(name, 1);
+ return;
+ }
free(d);
if((fd = open(name, OREAD)) < 0){
fprint(2, "open %s: %r\n", name);