Skip to contentSkip to conversation

emu10k1_synth use after free

PATCH Dave Jones 2 participants 2 messages Mar 6, 2006 Sound

lore
Share & tools
lore

Dave Jones

author
#0 lore raw

Thou shalt not dereference freed memory.

Coverity bug #958

sound/pci/emu10k1/emu10k1_synth.c renamed from sound/pci/emu10k1/emu10k1_synth.c~ +0 -1
@@ -62,7 +62,6 @@ static int snd_emu10k1_synth_new_device(
 
 	if (snd_emux_register(emu, dev->card, arg->index, "Emu10k1") < 0) {
 		snd_emux_free(emu);
-		emu->hw = NULL;
 		return -ENOMEM;
 	}
 
Signature · 1 line
http://www.codemonkey.org.uk
#1 lore raw

At Mon, 6 Mar 2006 03:53:17 -0500,

Quoted 11 lines · Dave Jones

Thou shalt not dereference freed memory.

Coverity bug #958

sound/pci/emu10k1/emu10k1_synth.c static int snd_emu10k1_synth_new_device( · line 67

Quoted 7 lines
sound/pci/emu10k1/emu10k1_synth.c renamed from sound/pci/emu10k1/emu10k1_synth.c~ +0 -1
@@ -62,7 +62,6 @@ static int snd_emu10k1_synth_new_device(
 
 	if (snd_emux_register(emu, dev->card, arg->index, "Emu10k1") < 0) {
 		snd_emux_free(emu);
-		emu->hw = NULL;
 		return -ENOMEM;
 	}
 

Thanks, I applied it to ALSA tree, too.

Takashi