Fix fd leak.