projects
/
profile
/
ivi
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
adac922
)
rosh: closedir() only if actually opened
author
Gene Cumm
<gene.cumm@gmail.com>
Sat, 2 Oct 2010 04:18:27 +0000
(
00:18
-0400)
committer
Gene Cumm
<gene.cumm@gmail.com>
Sat, 9 Oct 2010 11:33:07 +0000
(07:33 -0400)
com32/rosh/rosh.c
patch
|
blob
|
history
diff --git
a/com32/rosh/rosh.c
b/com32/rosh/rosh.c
index
f5ed6cd
..
8d063e6
100644
(file)
--- a/
com32/rosh/rosh.c
+++ b/
com32/rosh/rosh.c
@@
-780,11
+780,11
@@
void rosh_ls_arg(const char *filestr, const int *optarr)
ROSH_DEBUG("PATH '%s' is a directory\n", filestr);
if (d = opendir(filestr)) {
rosh_ls_arg_dir(filestr, d, optarr);
+ closedir(d);
} else {
rosh_error(errno, "ls", filestr);
errno = 0;
}
- closedir(d);
} else {
de.d_ino = rosh_ls_d_ino(&fdstat);
de.d_type = (IFTODT(fdstat.st_mode));