diff options
author | Charles Longeau <chl@cvs.openbsd.org> | 2011-05-02 22:15:12 +0000 |
---|---|---|
committer | Charles Longeau <chl@cvs.openbsd.org> | 2011-05-02 22:15:12 +0000 |
commit | 550d7bec7d6ef3410aa3be8d26b49c05ac7b8d96 (patch) | |
tree | bc8ef60269d6c2b909ca9b9ada6025c5720da56e /sys | |
parent | c716f15e6fbebc84f7588d0472100951c4252c9a (diff) |
Fix potential null dereference.
Found by LLVM/Clang Static Analyzer.
ok dlg@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/i2o/ioprbs.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); } |