Date: Mon, 24 Aug 2020 01:11:29 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364601 - stable/12/sys/cam/ctl Message-ID: <202008240111.07O1BTOU001480@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008240111.07O1BTOU001480>