sym(4): Don't double-free 'sim' in failure case

Reported by:	Coverity
CID:		1006106
Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Conrad Meyer 2016-04-20 05:13:36 +00:00
parent 115b4b9421
commit 26b5a97a27
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298340

View File

@ -8890,6 +8890,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,