fix memory leaks in get_local_fd from use of of fdopen()