mpathpersist: fix leaks
authorBenjamin Marzinski <bmarzins@redhat.com>
Fri, 13 Sep 2019 22:04:03 +0000 (17:04 -0500)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Tue, 1 Oct 2019 20:00:34 +0000 (22:00 +0200)
commit44c2e7e5ae249a5fb91baf91271d0be5c9bf4cbf
treea28ffa5b1ecd1c6098b049471e0ca017a04fc771
parentaaa2c7ed2e0da353128e2ea4ab496e1e070dd269
mpathpersist: fix leaks

If handle_args() fails while looping through the argument list, it needs
to free batch_fn, if it has been set. Also handle_args() needs to make
sure to free the file descriptor after it has been opened.

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