diff options
author | Patrick McHardy <kaber@trash.net> | 2008-01-09 18:41:58 (GMT) |
---|---|---|
committer | Thomas Graf <tgr@deb.localdomain> | 2008-01-10 11:44:22 (GMT) |
commit | c6609efc0fdcb1705cf157b4f383152edb7505c6 (patch) | |
tree | 30009e53604c150d49ca14867e5844756b1389ac /lib | |
parent | c8a0a5cdfba51f7de5d203aa13a97377b215515a (diff) | |
download | libnl-c6609efc0fdcb1705cf157b4f383152edb7505c6.zip libnl-c6609efc0fdcb1705cf157b4f383152edb7505c6.tar.gz libnl-c6609efc0fdcb1705cf157b4f383152edb7505c6.tar.bz2 |
[PATCH] libnl cache management leak
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cache.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/cache.c b/lib/cache.c index c1fbea6..285bc31 100644 --- a/lib/cache.c +++ b/lib/cache.c @@ -505,8 +505,11 @@ static int cache_include(struct nl_cache *cache, struct nl_object *obj, old = nl_cache_search(cache, obj); if (old) { nl_cache_remove(old); - if (type->mt_act == NL_ACT_DEL && cb) - cb(cache, old, NL_ACT_DEL); + if (type->mt_act == NL_ACT_DEL) { + if (cb) + cb(cache, old, NL_ACT_DEL); + nl_object_put(old); + } } if (type->mt_act == NL_ACT_NEW) { |