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

The return value must be 0