]> granicus.if.org Git - libnl/commitdiff
Do not increment refcount in rtnl_*_get_action APIs.
authorSanthosh Kumar <sshanmugham@twitter.com>
Tue, 21 Mar 2017 17:38:36 +0000 (10:38 -0700)
committerThomas Haller <thaller@redhat.com>
Wed, 3 May 2017 11:00:42 +0000 (13:00 +0200)
lib/route/cls/basic.c
lib/route/cls/u32.c
libnl-route-3.sym

index d330a19d16b437db5280567b6ae6bfd39f78e04e..912ded6ea89941a471c3666f1df58a8100cdf3fa 100644 (file)
@@ -243,9 +243,7 @@ struct rtnl_act* rtnl_basic_get_action(struct rtnl_cls *cls)
        if (!(b->b_mask & BASIC_ATTR_ACTION))
                return NULL;
 
-       struct rtnl_act* act = b->b_act;
-    rtnl_act_get(act);
-    return act;
+       return b->b_act;
 }
 
 int rtnl_basic_del_action(struct rtnl_cls *cls, struct rtnl_act *act)
index a6047b4cfe7a7f64970eac8241d1d1927878ff8d..087797e88e3cc99ae046a0d32779eb0c4f2dfe16 100644 (file)
@@ -570,9 +570,7 @@ struct rtnl_act* rtnl_u32_get_action(struct rtnl_cls *cls)
     if (!(u->cu_mask & U32_ATTR_ACTION))
         return NULL;
 
-    struct rtnl_act* act = u->cu_act;
-    rtnl_act_get(act);
-    return act;
+    return u->cu_act;
 }
 
 int rtnl_u32_del_action(struct rtnl_cls *cls, struct rtnl_act *act)
index 9edfec798a9ae88c34c9349f8d5345d9187d62ef..4d937ca2f650ee0c457ddbdeeb0600acf36d6dad 100644 (file)
@@ -824,8 +824,8 @@ global:
        rtnl_u32_add_key_uint16;
        rtnl_u32_add_key_uint32;
        rtnl_u32_add_key_uint8;
-       rtnl_u32_get_action;
        rtnl_u32_del_action;
+       rtnl_u32_get_action;
        rtnl_u32_get_key;
        rtnl_u32_set_classid;
        rtnl_u32_set_cls_terminal;