mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 17:51:22 +03:00
core/load-fragment: safe_close() protects errno
This commit is contained in:
parent
33f1b0aeea
commit
d4ad27a104
@ -3432,9 +3432,8 @@ static int open_follow(char **filename, FILE **_f, Set *names, char **_final) {
|
|||||||
|
|
||||||
f = fdopen(fd, "re");
|
f = fdopen(fd, "re");
|
||||||
if (!f) {
|
if (!f) {
|
||||||
r = -errno;
|
|
||||||
safe_close(fd);
|
safe_close(fd);
|
||||||
return r;
|
return -errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
*_f = f;
|
*_f = f;
|
||||||
|
Loading…
Reference in New Issue
Block a user