diff options
author | Thomas Graf <tgr@deb.localdomain> | 2007-12-17 22:01:06 (GMT) |
---|---|---|
committer | Thomas Graf <tgr@deb.localdomain> | 2007-12-17 22:01:06 (GMT) |
commit | 12ed4a03d302c2ba02799c3b2e4166dee7f9142a (patch) | |
tree | 227dbf812c64e01bf6f3cb3b4d0dbee4c8e7de0b /lib | |
parent | 155ad439a49df034ec58ee4218834bc5b0120515 (diff) | |
download | libnl-12ed4a03d302c2ba02799c3b2e4166dee7f9142a.zip libnl-12ed4a03d302c2ba02799c3b2e4166dee7f9142a.tar.gz libnl-12ed4a03d302c2ba02799c3b2e4166dee7f9142a.tar.bz2 |
Fix cache manager to not give back a reference it does not own
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cache_mngr.c | 7 |
1 files changed, 1 insertions, 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) |