[PATCH] veth: grab a reference for rtnl_link_veth_get_peer()
Cong Wang
xiyou.wangcong at gmail.com
Mon Apr 14 18:39:07 PDT 2014
Signed-off-by: Cong Wang <xiyou.wangcong at gmail.com>
---
lib/route/link/veth.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/route/link/veth.c b/lib/route/link/veth.c
index 19c84f8..3b6a89c 100644
--- a/lib/route/link/veth.c
+++ b/lib/route/link/veth.c
@@ -232,6 +232,7 @@ struct rtnl_link *rtnl_link_veth_alloc(void)
struct rtnl_link *rtnl_link_veth_get_peer(struct rtnl_link *link)
{
IS_VETH_LINK_ASSERT(link);
+ nl_object_get(OBJ_CAST(link->l_info));
return link->l_info;
}
--
1.8.3.1
More information about the libnl
mailing list