Fix coverity scan's warning (delete-array's typo, not initialized variable and checking return-value of open-syscall)

fd?