aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;