hinic: fix potential resource leak