提交 f2f2102d 编写于 作者: D David S. Miller

[XFRM]: Fix missed error setting in xfrm4_policy.c

When we can't find the afinfo we should return EAFNOSUPPORT.
GCC warned about the uninitialized 'err' for this path as well.
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 43372262
......@@ -175,6 +175,7 @@ __xfrm4_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int
afinfo = xfrm_state_get_afinfo(dst_prev->xfrm->props.family);
if (!afinfo) {
dst = *dst_p;
err = -EAFNOSUPPORT;
goto error;
}
dst_prev->output = afinfo->output;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册