netif_utils: correctly close fd on read error master
authorChristian Marangi <ansuelsmth@gmail.com>
Mon, 29 May 2023 15:07:54 +0000 (17:07 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Mon, 29 May 2023 15:07:54 +0000 (17:07 +0200)
commita85a5bc83bde5b485319ca12b6e32c4b7f0b120f
treeb1ded3b62620fe657a7b38ef478eb195aac2f494
parent462b3a491347e452c15220861949b1d6371fa59e
netif_utils: correctly close fd on read error

Fix Coverity Scan CID 1521069 reporting leaking fd on read error.
Refactor the read error handling and correctly close fd on read error.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
netif_utils.c