From dae0a2316ed9f5cc16670f8a49f7737d73b31c3c Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 10 Jun 2014 17:42:31 +0200 Subject: [PATCH] cache: fix crash in nl_cache_dump_filter() when omitting the params argument Error found by coverity. Acked-by: Thomas Graf Signed-off-by: Thomas Haller --- lib/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {