aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-02-17 01:09:29 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-17 01:09:29 -0500
commit2bb4646fce8d09916b351d1a62f98db7cec6fc41 (patch)
treec1f0d002e69868606eca9d1b919835f422892063 /net/xfrm
parent6836b9bdd98e3b500cd49512484df68f46e14659 (diff)
parentb0483e78e5c4c9871fc5541875b3bc006846d46b (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/xfrm')
-rw-r--r--net/xfrm/xfrm_state.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 96f2088e7448..9fa3322b2a7d 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -1106,7 +1106,7 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig, int *errp)
1106 int err = -ENOMEM; 1106 int err = -ENOMEM;
1107 struct xfrm_state *x = xfrm_state_alloc(net); 1107 struct xfrm_state *x = xfrm_state_alloc(net);
1108 if (!x) 1108 if (!x)
1109 goto error; 1109 goto out;
1110 1110
1111 memcpy(&x->id, &orig->id, sizeof(x->id)); 1111 memcpy(&x->id, &orig->id, sizeof(x->id));
1112 memcpy(&x->sel, &orig->sel, sizeof(x->sel)); 1112 memcpy(&x->sel, &orig->sel, sizeof(x->sel));
@@ -1164,16 +1164,10 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig, int *errp)
1164 return x; 1164 return x;
1165 1165
1166 error: 1166 error:
1167 xfrm_state_put(x);
1168out:
1167 if (errp) 1169 if (errp)
1168 *errp = err; 1170 *errp = err;
1169 if (x) {
1170 kfree(x->aalg);
1171 kfree(x->ealg);
1172 kfree(x->calg);
1173 kfree(x->encap);
1174 kfree(x->coaddr);
1175 }
1176 kfree(x);
1177 return NULL; 1171 return NULL;
1178} 1172}
1179 1173