mirror of
https://gitee.com/openharmony/third_party_libnl
synced 2025-02-26 06:18:06 +00:00
xfrm: fix memory leak for encap original address
Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com> Signed-off-by: Thomas Haller <thaller@redhat.com> http://lists.infradead.org/pipermail/libnl/2016-June/002141.html
This commit is contained in:
parent
0ee916bf6b
commit
01bd6ef7e0
@ -110,8 +110,11 @@ static void xfrm_sa_free_data(struct nl_object *c)
|
||||
free (sa->crypt);
|
||||
if (sa->comp)
|
||||
free (sa->comp);
|
||||
if (sa->encap)
|
||||
free (sa->encap);
|
||||
if (sa->encap) {
|
||||
if (sa->encap->encap_oa)
|
||||
nl_addr_put(sa->encap->encap_oa);
|
||||
free(sa->encap);
|
||||
}
|
||||
if (sa->coaddr)
|
||||
nl_addr_put (sa->coaddr);
|
||||
if (sa->sec_ctx)
|
||||
|
Loading…
x
Reference in New Issue
Block a user