Fix leaked fd.