+2
-2
@@ -834,8 +834,6 @@ int chase_symlinks(const char *path, const char *original_root, unsigned flags,
|
||||
if (fd < 0)
|
||||
return -errno;
|
||||
|
||||
free(done);
|
||||
|
||||
if (flags & CHASE_SAFE) {
|
||||
if (fstat(fd, &st) < 0)
|
||||
return -errno;
|
||||
@@ -846,6 +844,8 @@ int chase_symlinks(const char *path, const char *original_root, unsigned flags,
|
||||
previous_stat = st;
|
||||
}
|
||||
|
||||
free(done);
|
||||
|
||||
/* Note that we do not revalidate the root, we take it as is. */
|
||||
if (isempty(root))
|
||||
done = NULL;
|
||||
|
||||
Reference in New Issue
Block a user