From 20a051237c014c593be37487a60fd1666d264f8f Mon Sep 17 00:00:00 2001 From: roopa Date: Wed, 12 Dec 2012 21:48:30 -0800 Subject: Bug Fix: cache_include: Fix object ref release after successful object update The current code does a rtnl_link_put on new object instead of old object. This patch fixes it. None of the caches have support for object update, so this should not have affected anyone yet. Signed-off-by: Roopa Prabhu --- lib/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cache.c b/lib/cache.c index 8ba3d5b..36c45e1 100644 --- a/lib/cache.c +++ b/lib/cache.c @@ -736,7 +736,7 @@ static int cache_include(struct nl_cache *cache, struct nl_object *obj, */ if (nl_object_update(old, obj) == 0) { cb(cache, old, NL_ACT_CHANGE, data); - nl_object_put(obj); + nl_object_put(old); return 0; } -- cgit v1.2.1