projects
/
platform
/
upstream
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5509228
)
gavinl writes in Bug 661:
author
Mike Frysinger
<vapier@gentoo.org>
Fri, 3 Feb 2006 00:16:53 +0000
(
00:16
-0000)
committer
Mike Frysinger
<vapier@gentoo.org>
Fri, 3 Feb 2006 00:16:53 +0000
(
00:16
-0000)
if read() file return less than 1, we should close the fd and then goto end.
util-linux/mdev.c
patch
|
blob
|
history
diff --git
a/util-linux/mdev.c
b/util-linux/mdev.c
index
b8c0090
..
8f23120
100644
(file)
--- a/
util-linux/mdev.c
+++ b/
util-linux/mdev.c
@@
-42,8
+42,8
@@
static void make_device(char *path)
snprintf(temp, PATH_MAX, "%s/dev", path);
fd = open(temp, O_RDONLY);
len = read(fd, temp, PATH_MAX-1);
- if (len<1) goto end;
close(fd);
+ if (len<1) goto end;
/* Determine device name, type, major and minor */