From: roopa Date: Thu, 13 Dec 2012 05:48:30 +0000 (-0800) Subject: Bug Fix: cache_include: Fix object ref release after successful object update X-Git-Tag: libnl3_2_17~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20a051237c014c593be37487a60fd1666d264f8f;p=thirdparty%2Flibnl.git 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 --- 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; }