Don't touch a path after we've free'd it.

This commit is contained in:
Justin T. Gibbs 1999-05-04 19:24:21 +00:00
parent 78c6551783
commit 5f14bb14e3

View file

@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: scsi_target.c,v 1.8 1999/02/11 07:08:58 gibbs Exp $
* $Id: scsi_target.c,v 1.9 1999/03/05 23:25:10 gibbs Exp $
*/
#include <stddef.h> /* For offsetof */
@ -638,9 +638,6 @@ targallocinstance(struct ioc_alloc_unit *alloc_unit)
0, &cpi);
fail:
if (free_path_on_return != 0)
xpt_free_path(path);
switch (status) {
case CAM_REQ_CMP:
{
@ -668,6 +665,10 @@ fail:
error = ENODEV;
break;
}
if (free_path_on_return != 0)
xpt_free_path(path);
return (error);
}