Handle variable 'nullfd' going out of scope leaks the handle