artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2011187
)
dma_free(9) just once in error case
author
kn
<kn@openbsd.org>
Sat, 4 May 2024 16:40:38 +0000
(16:40 +0000)
committer
kn
<kn@openbsd.org>
Sat, 4 May 2024 16:40:38 +0000
(16:40 +0000)
buf is free'd and NULL, don't do it again to avoid a panic.
OK krw
sys/scsi/sd.c
patch
|
blob
|
history
diff --git
a/sys/scsi/sd.c
b/sys/scsi/sd.c
index
92d2f5e
..
fe1aa9f
100644
(file)
--- a/
sys/scsi/sd.c
+++ b/
sys/scsi/sd.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: sd.c,v 1.33
5 2023/11/10 17:43:39 krw Exp $
*/
+/* $OpenBSD: sd.c,v 1.33
6 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.