From b2229dcdbc14e2467ce7a3bdba97baa019eb9039 Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 18 Mar 2006 21:10:12 +0000 Subject: [PATCH] Coverity CID 955: Fix possible NULL deref. --- dist/am-utils/amd/autil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/am-utils/amd/autil.c b/dist/am-utils/amd/autil.c index 005ca6fd373e..50429779e2b3 100644 --- a/dist/am-utils/amd/autil.c +++ b/dist/am-utils/amd/autil.c @@ -1,4 +1,4 @@ -/* $NetBSD: autil.c,v 1.8 2006/03/18 21:07:47 christos Exp $ */ +/* $NetBSD: autil.c,v 1.9 2006/03/18 21:10:12 christos Exp $ */ /* * Copyright (c) 1997-2005 Erez Zadok @@ -398,7 +398,7 @@ amfs_mkcacheref(mntfs *mf) else cache = "none"; mf->mf_private = (opaque_t) mapc_find(mf->mf_info, cache, - mf->mf_fo->opt_maptype); + mf->mf_fo ? mf->mf_fo->opt_maptype : NULL); mf->mf_prfree = mapc_free; }