Signed-off-by: Rodrigo Campos <rodrigo@xxxxxxxxxxx> --- src/vfs/utils.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git src/vfs/utils.c src/vfs/utils.c index 8b000506..ea7536c1 100644 --- src/vfs/utils.c +++ src/vfs/utils.c @@ -129,10 +129,8 @@ static int write_id_mapping(idmap_type_t map_type, pid_t pid, const char *buf, s fret = 0; out: - if (fd >= 0) - close(fd); - if (setgroups_fd >= 0) - close(setgroups_fd); + safe_close(fd); + safe_close(setgroups_fd); return fret; } -- 2.39.2