dect
/
libnl
Archived
13
0
Fork 0

link: Free and realloc af specific data upon rtnl_link_set_family()

Signed-off-by: Thomas Graf <tgraf@suug.ch>
This commit is contained in:
Thomas Graf 2013-02-05 13:52:22 +01:00
parent 4a793a4235
commit 8026fe2e3a
1 changed files with 6 additions and 0 deletions

View File

@ -1742,6 +1742,12 @@ void rtnl_link_set_family(struct rtnl_link *link, int family)
{
link->l_family = family;
link->ce_mask |= LINK_ATTR_FAMILY;
if (link->l_af_ops)
af_free(link, link->l_af_ops,
link->l_af_data[link->l_af_ops->ao_family], NULL);
link->l_af_ops = af_lookup_and_alloc(link, family);
}
/**