mirror of
https://github.com/systemd/systemd.git
synced 2024-10-31 16:21:26 +03:00
nspawn: make sure we don't leak the fd in chase_symlinks_and_update
No callers use CHASE_OPEN right now, but let's be defensive.
This commit is contained in:
parent
f863b1c6fa
commit
8405dcf752
@ -2233,10 +2233,8 @@ static int chase_symlinks_and_update(char **p, unsigned flags) {
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to resolve path %s: %m", *p);
|
||||
|
||||
free(*p);
|
||||
*p = chased;
|
||||
|
||||
return 0;
|
||||
free_and_replace(*p, chased);
|
||||
return r; /* r might be an fd here in case we ever use CHASE_OPEN in flags */
|
||||
}
|
||||
|
||||
static int determine_uid_shift(const char *directory) {
|
||||
|
Loading…
Reference in New Issue
Block a user