diff options
Diffstat (limited to 'lib/xfrm')
-rw-r--r-- | lib/xfrm/ae.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/xfrm/ae.c b/lib/xfrm/ae.c index 8e82c9ad..011a6e52 100644 --- a/lib/xfrm/ae.c +++ b/lib/xfrm/ae.c @@ -174,9 +174,9 @@ static int xfrm_ae_clone(struct nl_object *_dst, struct nl_object *_src) if (src->replay_state_esn) { uint32_t len = sizeof (struct xfrmnl_replay_state_esn) + (sizeof (uint32_t) * src->replay_state_esn->bmp_len); - if ((dst->replay_state_esn = (struct xfrmnl_replay_state_esn*)calloc (1, len)) == NULL) + if ((dst->replay_state_esn = malloc (len)) == NULL) return -NLE_NOMEM; - memcpy (dst->replay_state_esn, dst->replay_state_esn, len); + memcpy (dst->replay_state_esn, src->replay_state_esn, len); } return 0; |