[PATCH] Bug Fix: cache_include: Fix object ref release after successful object update
roopa at cumulusnetworks.com
roopa at cumulusnetworks.com
Thu Dec 13 00:48:30 EST 2012
From: roopa <roopa at cumulusnetworks.com>
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 at cumulusnetworks.com>
---
lib/cache.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/cache.c b/lib/cache.c
index 283f1ac..04da99a 100644
--- a/lib/cache.c
+++ b/lib/cache.c
@@ -750,7 +750,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;
}
--
1.7.2.5
More information about the libnl
mailing list