From 12ed4a03d302c2ba02799c3b2e4166dee7f9142a Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Mon, 17 Dec 2007 23:01:06 +0100 Subject: [PATCH] Fix cache manager to not give back a reference it does not own --- lib/cache_mngr.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/cache_mngr.c b/lib/cache_mngr.c index 4e6b1a6..b305ac7 100644 --- a/lib/cache_mngr.c +++ b/lib/cache_mngr.c @@ -89,18 +89,13 @@ static int include_cb(struct nl_object *obj, struct nl_parser_param *p) { struct nl_cache_assoc *ca = p->pp_arg; - int err; NL_DBG(2, "Including object %p into cache %p\n", obj, ca->ca_cache); #ifdef NL_DEBUG if (nl_debug >= 4) nl_object_dump(obj, &nl_debug_dp); #endif - err = nl_cache_include(ca->ca_cache, obj, ca->ca_change); - - nl_object_put(obj); - - return err; + return nl_cache_include(ca->ca_cache, obj, ca->ca_change); } static int event_input(struct nl_msg *msg, void *arg)