checkpath: fix code to walk the directory path
X-Gentoo-Bug: 782808 X-Gentoo-Bug-URL: https://bugs.gentoo.org/782808
This commit is contained in:
parent
63db2d99e7
commit
791322d7fa
@ -132,13 +132,14 @@ static int get_dirfd(char *path, bool symlinks)
|
|||||||
*/
|
*/
|
||||||
close(new_dirfd);
|
close(new_dirfd);
|
||||||
} else {
|
} else {
|
||||||
|
/* now walk down the directory path */
|
||||||
close(dirfd);
|
close(dirfd);
|
||||||
dirfd = new_dirfd;
|
dirfd = new_dirfd;
|
||||||
free(linkpath);
|
free(linkpath);
|
||||||
linkpath = NULL;
|
linkpath = NULL;
|
||||||
|
item = strtok(NULL, "/");
|
||||||
|
components--;
|
||||||
}
|
}
|
||||||
item = strtok(NULL, "/");
|
|
||||||
components--;
|
|
||||||
}
|
}
|
||||||
free(path_dupe);
|
free(path_dupe);
|
||||||
free(linkpath);
|
free(linkpath);
|
||||||
|
Loading…
Reference in New Issue
Block a user