diff options
| author | vapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-02-03 00:16:53 +0000 |
|---|---|---|
| committer | vapier <vapier@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-02-03 00:16:53 +0000 |
| commit | 50efcb895e36da97597dbf98fd20cd9a01e76d24 (patch) | |
| tree | 70286507609f19815a3ed038f208b4af21ddfd57 /util-linux | |
| parent | 49874a001ca612addc8ea447b5eb82e69f17845f (diff) | |
| download | busybox-w32-50efcb895e36da97597dbf98fd20cd9a01e76d24.tar.gz busybox-w32-50efcb895e36da97597dbf98fd20cd9a01e76d24.tar.bz2 busybox-w32-50efcb895e36da97597dbf98fd20cd9a01e76d24.zip | |
gavinl writes in Bug 661:
if read() file return less than 1, we should close the fd and then goto end.
git-svn-id: svn://busybox.net/trunk/busybox@13800 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'util-linux')
| -rw-r--r-- | util-linux/mdev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util-linux/mdev.c b/util-linux/mdev.c index b8c0090fa..8f2312060 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c | |||
| @@ -42,8 +42,8 @@ static void make_device(char *path) | |||
| 42 | snprintf(temp, PATH_MAX, "%s/dev", path); | 42 | snprintf(temp, PATH_MAX, "%s/dev", path); |
| 43 | fd = open(temp, O_RDONLY); | 43 | fd = open(temp, O_RDONLY); |
| 44 | len = read(fd, temp, PATH_MAX-1); | 44 | len = read(fd, temp, PATH_MAX-1); |
| 45 | if (len<1) goto end; | ||
| 46 | close(fd); | 45 | close(fd); |
| 46 | if (len<1) goto end; | ||
| 47 | 47 | ||
| 48 | /* Determine device name, type, major and minor */ | 48 | /* Determine device name, type, major and minor */ |
| 49 | 49 | ||
