Skip to content

Commit

Permalink
[XFRM]: Fix missed error setting in xfrm4_policy.c
Browse files Browse the repository at this point in the history
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: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Feb 8, 2007
1 parent 4337226 commit f2f2102
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/ipv4/xfrm4_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f2f2102

Please sign in to comment.