From 060c20e55d7dbbc156cb981b2778a1425b90cb06 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 2 Jan 2015 17:02:19 +0000 Subject: =?UTF-8?q?Explicitly=20set=20the=20*data=20member=20of=20struct?= =?UTF-8?q?=20ohash=5Finfo=20to=20NULL.=20It=20is=20never=20dereferenced,?= =?UTF-8?q?=20but=20it=20gets=20copied=20around,=20which=20worries=20stati?= =?UTF-8?q?c=20analysis=20tools=20and=20might=20also=20confuse=20human=20a?= =?UTF-8?q?uditors.=20FreeBSD=20Coverity=20CID=201261298,=201261299,=20126?= =?UTF-8?q?1300,=20reported=20by=20Pedro=20Giffuni=20and=20Ulrich=20Sp?= =?UTF-8?q?=C3=B6rlein=20.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mandocdb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mandocdb.c') diff --git a/mandocdb.c b/mandocdb.c index fc5cdb85..65c786ae 100644 --- a/mandocdb.c +++ b/mandocdb.c @@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.180 2014/12/30 20:41:00 schwarze Exp $ */ +/* $Id: mandocdb.c,v 1.181 2015/01/02 17:02:19 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze @@ -350,7 +350,8 @@ mandocdb(int argc, char *argv[]) mpages_info.alloc = mlinks_info.alloc = hash_alloc; mpages_info.calloc = mlinks_info.calloc = hash_calloc; - mpages_info.free = mlinks_info.free = hash_free; + mpages_info.free = mlinks_info.free = hash_free; + mpages_info.data = mlinks_info.data = NULL; mpages_info.key_offset = offsetof(struct mpage, inodev); mlinks_info.key_offset = offsetof(struct mlink, file); @@ -1106,6 +1107,7 @@ mpages_merge(struct mparse *mp) str_info.alloc = hash_alloc; str_info.calloc = hash_calloc; str_info.free = hash_free; + str_info.data = NULL; str_info.key_offset = offsetof(struct str, key); if ( ! nodb) -- cgit v1.2.3