Malloc returns on error instead of blocking forever