diff options
author | Thomas Haller <thaller@redhat.com> | 2014-06-10 15:42:31 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-06-10 19:45:52 (GMT) |
commit | dae0a2316ed9f5cc16670f8a49f7737d73b31c3c (patch) | |
tree | f3b2957af2165fd5ca6781eba279be529f879ddb | |
parent | 8532ac5e10e02bd3a0d7e0bb168ba1536297137f (diff) | |
download | libnl-dae0a2316ed9f5cc16670f8a49f7737d73b31c3c.zip libnl-dae0a2316ed9f5cc16670f8a49f7737d73b31c3c.tar.gz libnl-dae0a2316ed9f5cc16670f8a49f7737d73b31c3c.tar.bz2 |
cache: fix crash in nl_cache_dump_filter() when omitting the params argument
Error found by coverity.
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r-- | lib/cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/cache.c b/lib/cache.c index 5418051..b4f9649 100644 --- a/lib/cache.c +++ b/lib/cache.c @@ -1154,7 +1154,7 @@ void nl_cache_dump_filter(struct nl_cache *cache, if (!ops->oo_dump[type]) return; - if (params->dp_buf) + if (params && params->dp_buf) memset(params->dp_buf, 0, params->dp_buflen); nl_list_for_each_entry(obj, &cache->c_items, ce_list) { |