summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2016-05-13 08:58:49 +0000
committerngie <ngie@FreeBSD.org>2016-05-13 08:58:49 +0000
commit747508b629539c8c76579e129969af89cc1cb292 (patch)
tree3223c6c21462b8acbf1e67f01280cc86a9789c63 /sys/dev
parentb8862d73f093e6f41ef3b125aeffec576f42a924 (diff)
downloadFreeBSD-src-747508b629539c8c76579e129969af89cc1cb292.zip
FreeBSD-src-747508b629539c8c76579e129969af89cc1cb292.tar.gz
MFC r298340:
r298340 (by cem): sym(4): Don't double-free 'sim' in failure case CID: 1006106
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/sym/sym_hipd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/sym/sym_hipd.c b/sys/dev/sym/sym_hipd.c
index 5576e72..21c7c10 100644
--- a/sys/dev/sym/sym_hipd.c
+++ b/sys/dev/sym/sym_hipd.c
@@ -8894,6 +8894,7 @@ static int sym_cam_attach(hcb_p np)
if (xpt_bus_register(sim, np->device, 0) != CAM_SUCCESS)
goto fail;
np->sim = sim;
+ sim = NULL;
if (xpt_create_path(&path, NULL,
cam_sim_path(np->sim), CAM_TARGET_WILDCARD,
OpenPOWER on IntegriCloud