tcp: correctly crypto_alloc_hash return check