diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2014-08-03 14:30:29 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2014-08-03 14:30:29 +0000 |
commit | 134bbb9d45f5dbde3b5d008fbf3fa270effa8d4d (patch) | |
tree | 20ac33ec5fc0df7d992ef2a9cc0ecabc93ab741e /sys/dev/usb/ehci.c | |
parent | 86ab3c7da3de21a7d8184071750b72b90ce540d8 (diff) |
don't return unitialised memory on error in ehci_alloc_sqtd()
It seems mpi introduced a problem into ehci.c rev 1.162
two weeks ago. An error check that used to return NULL
now jumps to the end of the function, but sqtd isn't
initialised at that point.
ok miod@ deraadt@
Diffstat (limited to 'sys/dev/usb/ehci.c')
-rw-r--r-- | sys/dev/usb/ehci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c index 9da65060f24..05c006cb0c1 100644 --- a/sys/dev/usb/ehci.c +++ b/sys/dev/usb/ehci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ehci.c,v 1.162 2014/07/12 20:13:48 mpi Exp $ */ +/* $OpenBSD: ehci.c,v 1.163 2014/08/03 14:30:28 jsg Exp $ */ /* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */ /* @@ -2363,7 +2363,7 @@ ehci_free_sqh(struct ehci_softc *sc, struct ehci_soft_qh *sqh) struct ehci_soft_qtd * ehci_alloc_sqtd(struct ehci_softc *sc) { - struct ehci_soft_qtd *sqtd; + struct ehci_soft_qtd *sqtd = NULL; usbd_status err; int i, offs; struct usb_dma dma; |