aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ipsec
diff options
context:
space:
mode:
authorKingwel Xie <kingwel.xie@ericsson.com>2019-02-12 04:47:33 -0800
committerDamjan Marion <dmarion@me.com>2019-02-14 17:19:18 +0000
commit364b1cad183cd8c0dbda4011cb4117ef0e6508a0 (patch)
treee6b5463bcc71bc55c4c21c7768fa60001d51cb23 /src/vnet/ipsec
parent47727c02df4c79c21c6ceffaff65222c32cf6996 (diff)
ipsec: memory leak fixup
Change-Id: Ib2ad196bec1005d6678589d5b5c199b8a541c720 Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com>
Diffstat (limited to 'src/vnet/ipsec')
-rw-r--r--src/vnet/ipsec/ipsec_sa.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vnet/ipsec/ipsec_sa.c b/src/vnet/ipsec/ipsec_sa.c
index b0de76ac508..c4721c7afad 100644
--- a/src/vnet/ipsec/ipsec_sa.c
+++ b/src/vnet/ipsec/ipsec_sa.c
@@ -272,7 +272,10 @@ ipsec_set_sa_key (u32 id, const ipsec_key_t * ck, const ipsec_key_t * ik)
{
err = ipsec_call_add_del_callbacks (im, sa, sa_index, 0);
if (err)
- return VNET_API_ERROR_SYSCALL_ERROR_1;
+ {
+ clib_error_free (err);
+ return VNET_API_ERROR_SYSCALL_ERROR_1;
+ }
}
return 0;