diff options
author | 2014-05-01 10:25:44 +0000 | |
---|---|---|
committer | 2014-05-01 10:25:44 +0000 | |
commit | b41263792bba4d82ecd46cf4c20737065614f039 (patch) | |
tree | 0f9e4bb3ec5ec63b5c4ef9fece1ce004c363651e | |
parent | Correct a test for X509_get_notAfter() failing or returning (diff) | |
download | wireguard-openbsd-b41263792bba4d82ecd46cf4c20737065614f039.tar.xz wireguard-openbsd-b41263792bba4d82ecd46cf4c20737065614f039.zip |
move pointer use to after a NULL pointer check
ok dlg@
-rw-r--r-- | sys/scsi/mpath.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/scsi/mpath.c b/sys/scsi/mpath.c index 1f26e6b60b1..777397d7e6d 100644 --- a/sys/scsi/mpath.c +++ b/sys/scsi/mpath.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpath.c,v 1.34 2013/09/08 09:47:36 dlg Exp $ */ +/* $OpenBSD: mpath.c,v 1.35 2014/05/01 10:25:44 jsg Exp $ */ /* * Copyright (c) 2009 David Gwynne <dlg@openbsd.org> @@ -542,13 +542,14 @@ int mpath_path_detach(struct mpath_path *p) { struct mpath_group *g = p->p_group; - struct mpath_dev *d = g->g_dev; + struct mpath_dev *d; struct mpath_path *np = NULL; #ifdef DIAGNOSTIC if (g == NULL) panic("mpath: detaching a path from a nonexistant bus"); #endif + d = g->g_dev; p->p_group = NULL; mtx_enter(&d->d_mtx); |