OSDN Git Service

make_mac_path(): fix leaked file descriptor.
authorPeter Jones <pjones@redhat.com>
Mon, 1 May 2017 18:42:25 +0000 (14:42 -0400)
committerPeter Jones <pjones@redhat.com>
Mon, 1 May 2017 20:05:46 +0000 (16:05 -0400)
commitf3304710b72de55249ef461c544edffd5705bdc7
tree75193163f2481680b532d5df72600c1ca141c2bd
parent0967cd89ae6c1e55c1d136669e2f426752f233f4
make_mac_path(): fix leaked file descriptor.

When make_mac_path() gets an error from efidp_make_mac_addr(), it fails
to close the file descriptor to the network device.  So close it.  Also
ensure that the ifrn_name field is NUL terminated.

Found by covscan.

Signed-off-by: Peter Jones <pjones@redhat.com>
src/linux.c