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,14 +132,15 @@ static int get_dirfd(char *path, bool symlinks)
|
||||
*/
|
||||
close(new_dirfd);
|
||||
} else {
|
||||
/* now walk down the directory path */
|
||||
close(dirfd);
|
||||
dirfd = new_dirfd;
|
||||
free(linkpath);
|
||||
linkpath = NULL;
|
||||
}
|
||||
item = strtok(NULL, "/");
|
||||
components--;
|
||||
}
|
||||
}
|
||||
free(path_dupe);
|
||||
free(linkpath);
|
||||
return dirfd;
|
||||
|
Loading…
Reference in New Issue
Block a user