Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Don't use uninitialized data variable when len =...



details:   https://anonhg.NetBSD.org/src/rev/c908d022193e
branches:  trunk
changeset: 815015:c908d022193e
user:      joerg <joerg%NetBSD.org@localhost>
date:      Mon Apr 25 20:06:51 2016 +0000

description:
Don't use uninitialized data variable when len == 0.

diffstat:

 sys/dev/usb/uhci.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r a647e663a186 -r c908d022193e sys/dev/usb/uhci.c
--- a/sys/dev/usb/uhci.c        Mon Apr 25 16:35:47 2016 +0000
+++ b/sys/dev/usb/uhci.c        Mon Apr 25 20:06:51 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uhci.c,v 1.269 2016/04/23 13:14:52 skrll Exp $ */
+/*     $NetBSD: uhci.c,v 1.270 2016/04/25 20:06:51 joerg Exp $ */
 
 /*
  * Copyright (c) 1998, 2004, 2011, 2012 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.269 2016/04/23 13:14:52 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhci.c,v 1.270 2016/04/25 20:06:51 joerg Exp $");
 
 #include "opt_usb.h"
 
@@ -2496,7 +2496,7 @@
        usb_device_request_t *req = &xfer->ux_request;
        struct usbd_device *dev = upipe->pipe.up_dev;
        uhci_softc_t *sc = dev->ud_bus->ub_hcpriv;
-       uhci_soft_td_t *data;
+       uhci_soft_td_t *data = NULL;
        int len;
        usbd_status err;
        int isread;



Home | Main Index | Thread Index | Old Index