tap: fix possible fd leak in net_init_tap