]> git.ipfire.org Git - thirdparty/util-linux.git/commit
switch_root: fix double close [coverity scan]
authorKarel Zak <kzak@redhat.com>
Fri, 16 Oct 2020 09:56:35 +0000 (11:56 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 16 Oct 2020 09:56:35 +0000 (11:56 +0200)
commitd3e58a8ec974a7aa4cac9ca869d9b02582f8098f
tree9b9ebb2ff7e0fcab74ddcf567fb3d54312ff2c15
parent7f9e76b4df7a68f09c8fcf4be9b2ac5a1c35956c
switch_root: fix double close [coverity scan]

Up on successful fdopendir(3) file descriptior that will be closed, that
happens in recursiveRemove() switch_root(8) function.

CID: 360697
Reference: https://pubs.opengroup.org/onlinepubs/9699919799/functions/fdopendir.html
Co-Author: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
sys-utils/switch_root.c