summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroopa <roopa@cumulusnetworks.com>2012-12-12 21:48:30 -0800
committerThomas Graf <tgraf@suug.ch>2012-12-17 16:46:58 +0100
commit20a051237c014c593be37487a60fd1666d264f8f (patch)
tree66dd86e4dcff1c42bed06f92ae5e9695e4b5b58a
parent29b71371e764b04666d903bcbda452426aa1c634 (diff)
downloadlibnl-20a051237c014c593be37487a60fd1666d264f8f.tar.gz
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 <roopa@cumulusnetworks.com>
-rw-r--r--lib/cache.c2
1 files changed, 1 insertions, 1 deletions
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;
}