diff options
author | Klemens Nanni <kn@cvs.openbsd.org> | 2024-05-04 16:40:39 +0000 |
---|---|---|
committer | Klemens Nanni <kn@cvs.openbsd.org> | 2024-05-04 16:40:39 +0000 |
commit | 710b6915ad992b2a37d3cdf86f5f5f9797ac852c (patch) | |
tree | 742bfacb1b521ec5d468560a563c83a4c0da8150 /sys/scsi | |
parent | 16a4e8cb4f0bda9527e1e11f66256f109c3921a1 (diff) |
dma_free(9) just once in error case
buf is free'd and NULL, don't do it again to avoid a panic.
OK krw
Diffstat (limited to 'sys/scsi')
-rw-r--r-- | sys/scsi/sd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index 92d2f5e10b0..fe1aa9fc7a7 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.335 2023/11/10 17:43:39 krw Exp $ */ +/* $OpenBSD: sd.c,v 1.336 2024/05/04 16:40:38 kn Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -1771,7 +1771,7 @@ validate: } if (dp.disksize == 0) - goto die; + return -1; /* * Restrict secsize values to powers of two between 512 and 64k. |