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>
This commit is contained in:
parent
8532ac5e10
commit
dae0a2316e
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue