file-posix: Don't leak fd in hdev_get_max_segments
commitfed414df9dc9abef040adfbd8c5956fb610edaa2
authorFam Zheng <famz@redhat.com>
Tue, 14 Mar 2017 16:12:05 +0000 (15 00:12 +0800)
committerKevin Wolf <kwolf@redhat.com>
Fri, 17 Mar 2017 11:54:06 +0000 (17 12:54 +0100)
tree1e7c433cd89cd990c1d7602e9658681579b54d90
parent37a9051cc7d30672216af5f6620af1da122f66b3
file-posix: Don't leak fd in hdev_get_max_segments

This fixes a leaked fd introduced in commit 9103f1ce.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/file-posix.c