Fixes use-before-init in syscall error handling