[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101006223941.GW14666@outflux.net>
Date: Wed, 6 Oct 2010 15:39:41 -0700
From: Kees Cook <kees.cook@...onical.com>
To: linux-kernel@...r.kernel.org
Cc: devel@...verdev.osuosl.org, Greg Kroah-Hartman <gregkh@...e.de>,
Mauro Carvalho Chehab <mchehab@...hat.com>,
Stefan Ringel <stefan.ringel@...or.de>,
Stephen Rothwell <sfr@...b.auug.org.au>
Subject: [PATCH] staging: fix possible use-before-NULL-check crash
Found via http://coccinelle.lip6.fr/rules/mini_null_ref.cocci
Signed-off-by: Kees Cook <kees.cook@...onical.com>
---
drivers/staging/tm6000/tm6000-alsa.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/staging/tm6000/tm6000-alsa.c b/drivers/staging/tm6000/tm6000-alsa.c
index 087137d..c1aff0e 100644
--- a/drivers/staging/tm6000/tm6000-alsa.c
+++ b/drivers/staging/tm6000/tm6000-alsa.c
@@ -426,10 +426,11 @@ error:
static int tm6000_audio_fini(struct tm6000_core *dev)
{
- struct snd_tm6000_card *chip = dev->adev;
+ struct snd_tm6000_card *chip;
if (!dev)
return 0;
+ chip = dev->adev;
if (!chip)
return 0;
--
1.7.1
--
Kees Cook
Ubuntu Security Team
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists