diff options
-rw-r--r-- | src/cmd/core.c | 5 |
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); |