From 550d7bec7d6ef3410aa3be8d26b49c05ac7b8d96 Mon Sep 17 00:00:00 2001 From: Charles Longeau Date: Mon, 2 May 2011 22:15:12 +0000 Subject: Fix potential null dereference. Found by LLVM/Clang Static Analyzer. ok dlg@ --- sys/dev/i2o/ioprbs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/dev/i2o/ioprbs.c b/sys/dev/i2o/ioprbs.c index e8e9abab62f..a4cdd6b2b89 100644 --- a/sys/dev/i2o/ioprbs.c +++ b/sys/dev/i2o/ioprbs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ioprbs.c,v 1.30 2011/04/27 18:54:19 matthew Exp $ */ +/* $OpenBSD: ioprbs.c,v 1.31 2011/05/02 22:15:11 chl Exp $ */ /* * Copyright (c) 2001 Niklas Hallqvist @@ -669,7 +669,8 @@ ioprbs_get_ccb(void *cookie) mtx_leave(&sc->sc_ccb_mtx); /* initialise the command */ - ccb->ic_flags = 0; + if (ccb) + ccb->ic_flags = 0; return (ccb); } -- cgit v1.2.3