Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Avoid dereferencing an uninitialized pointer
details: https://anonhg.NetBSD.org/src/rev/7aee6bd851df
branches: trunk
changeset: 787035:7aee6bd851df
user: martin <martin%NetBSD.org@localhost>
date: Thu May 30 08:28:13 2013 +0000
description:
Avoid dereferencing an uninitialized pointer
diffstat:
sys/dev/cgd.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 395a1fe17b99 -r 7aee6bd851df sys/dev/cgd.c
--- a/sys/dev/cgd.c Thu May 30 05:50:06 2013 +0000
+++ b/sys/dev/cgd.c Thu May 30 08:28:13 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cgd.c,v 1.80 2013/05/29 23:25:39 christos Exp $ */
+/* $NetBSD: cgd.c,v 1.81 2013/05/30 08:28:13 martin Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.80 2013/05/29 23:25:39 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.81 2013/05/30 08:28:13 martin Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -747,7 +747,7 @@
static int
cgd_ioctl_get(dev_t dev, void *data, struct lwp *l)
{
- struct cgd_softc *cs;
+ struct cgd_softc *cs = getcgd_softc(dev);
struct cgd_user *cgu;
int unit;
struct dk_softc *dksc = &cs->sc_dksc;
Home |
Main Index |
Thread Index |
Old Index