kpartx: fail if dup() of dasd file descriptor fails
authorBenjamin Marzinski <bmarzins@redhat.com>
Fri, 17 May 2019 16:14:08 +0000 (11:14 -0500)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 3 Jul 2019 06:03:50 +0000 (08:03 +0200)
commit14c7c5c042138901f3d6b1eb7d6d61e626c3a66b
treee8efeeda7e2f90173abed829505dc6badd7c4f63
parent9e9c504954c5fea70677c541f29ba4efd19c26fa
kpartx: fail if dup() of dasd file descriptor fails

If kpartx fails to create a copy of the dasd file descriptor, it should
fail, instead of treating the error value as a valid fd. Found by
coverity.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
kpartx/dasd.c