-/* $OpenBSD: softraid.c,v 1.376 2016/05/31 15:19:12 jsing Exp $ */
+/* $OpenBSD: softraid.c,v 1.377 2016/07/20 20:45:13 krw Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
struct scsi_link *link;
struct device *dev;
char *uuid, devname[32];
- dev_t *dt;
+ dev_t *dt = NULL;
int i, no_chunk, rv = EINVAL, target, vol;
int no_meta;
sd->sd_ready = 1;
+ free(dt, M_DEVBUF, bc->bc_dev_list_len);
+
return (rv);
unwind:
+ free(dt, M_DEVBUF, bc->bc_dev_list_len);
+
sr_discipline_shutdown(sd, 0);
if (rv == EAGAIN)