Fix CTL ioctl port creation error handling.
Submitted by: Bret Ketchum MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D26143
This commit is contained in:
parent
ab1c54fec6
commit
7758c80f74
@ -226,7 +226,7 @@ cfi_ioctl_port_create(struct ctl_req *req)
|
||||
req->status = CTL_LUN_ERROR;
|
||||
snprintf(req->error_str, sizeof(req->error_str),
|
||||
"ctl_port_register() failed with error %d", retval);
|
||||
free(port, M_CTL);
|
||||
free(cfi, M_CTL);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -247,7 +247,9 @@ cfi_ioctl_port_create(struct ctl_req *req)
|
||||
req->status = CTL_LUN_ERROR;
|
||||
snprintf(req->error_str, sizeof(req->error_str),
|
||||
"make_dev_s() failed with error %d", retval);
|
||||
free(port, M_CTL);
|
||||
ctl_port_offline(port);
|
||||
ctl_port_deregister(port);
|
||||
free(cfi, M_CTL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user