diff options
Diffstat (limited to '')
| -rw-r--r-- | miscutils/devfsd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c index d57691414..e6f01eb6a 100644 --- a/miscutils/devfsd.c +++ b/miscutils/devfsd.c | |||
| @@ -1016,9 +1016,9 @@ static void restore(char *spath, struct stat source_stat, int rootlen) | |||
| 1016 | dest_stat.st_mode = 0; | 1016 | dest_stat.st_mode = 0; |
| 1017 | dpath = concat_path_file(mount_point, spath + rootlen); | 1017 | dpath = concat_path_file(mount_point, spath + rootlen); |
| 1018 | lstat(dpath, &dest_stat); | 1018 | lstat(dpath, &dest_stat); |
| 1019 | free(dpath); | ||
| 1020 | if (S_ISLNK(source_stat.st_mode) || (source_stat.st_mode & S_ISVTX)) | 1019 | if (S_ISLNK(source_stat.st_mode) || (source_stat.st_mode & S_ISVTX)) |
| 1021 | copy_inode(dpath, &dest_stat, (source_stat.st_mode & ~S_ISVTX), spath, &source_stat); | 1020 | copy_inode(dpath, &dest_stat, (source_stat.st_mode & ~S_ISVTX), spath, &source_stat); |
| 1021 | free(dpath); | ||
| 1022 | 1022 | ||
| 1023 | if (S_ISDIR(source_stat.st_mode)) | 1023 | if (S_ISDIR(source_stat.st_mode)) |
| 1024 | dir_operation(RESTORE, spath, rootlen, NULL); | 1024 | dir_operation(RESTORE, spath, rootlen, NULL); |
| @@ -1271,7 +1271,7 @@ static void dir_operation(int type, const char * dir_name, int var, unsigned lon | |||
| 1271 | 1271 | ||
| 1272 | while ((de = readdir(dp)) != NULL) { | 1272 | while ((de = readdir(dp)) != NULL) { |
| 1273 | 1273 | ||
| 1274 | if (de->d_name && DOT_OR_DOTDOT(de->d_name)) | 1274 | if (DOT_OR_DOTDOT(de->d_name)) |
| 1275 | continue; | 1275 | continue; |
| 1276 | path = concat_path_file(dir_name, de->d_name); | 1276 | path = concat_path_file(dir_name, de->d_name); |
| 1277 | if (lstat(path, &statbuf) == 0) { | 1277 | if (lstat(path, &statbuf) == 0) { |
