svn commit: r364601 - stable/12/sys/cam/ctl
Alexander Motin
mav at FreeBSD.org
Mon Aug 24 01:11:29 UTC 2020
Author: mav
Date: Mon Aug 24 01:11:29 2020
New Revision: 364601
URL: https://svnweb.freebsd.org/changeset/base/364601
Log:
MFC r364463: Fix CTL ioctl port creation error handling.
Modified:
stable/12/sys/cam/ctl/ctl_frontend_ioctl.c
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sys/cam/ctl/ctl_frontend_ioctl.c
==============================================================================
--- stable/12/sys/cam/ctl/ctl_frontend_ioctl.c Sun Aug 23 23:56:57 2020 (r364600)
+++ stable/12/sys/cam/ctl/ctl_frontend_ioctl.c Mon Aug 24 01:11:29 2020 (r364601)
@@ -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;
}
More information about the svn-src-all
mailing list