summaryrefslogtreecommitdiffstats
path: root/net/ipv4/xfrm4_policy.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-02-06 14:32:42 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2007-02-08 12:39:03 -0800
commitf2f2102d1a1dbc83b5b37b6596cd8374120cbe16 (patch)
treea855ae6e20ad46ab2f138d268250b9b81cc31077 /net/ipv4/xfrm4_policy.c
parent4337226228e1cfc1d70ee975789c6bd070fb597c (diff)
downloadop-kernel-dev-f2f2102d1a1dbc83b5b37b6596cd8374120cbe16.zip
op-kernel-dev-f2f2102d1a1dbc83b5b37b6596cd8374120cbe16.tar.gz
[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: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/xfrm4_policy.c')
-rw-r--r--net/ipv4/xfrm4_policy.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
index 011136a..699f27c 100644
--- a/net/ipv4/xfrm4_policy.c
+++ b/net/ipv4/xfrm4_policy.c
@@ -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;
OpenPOWER on IntegriCloud