Commit b99f2adc authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] opl3 use-after-free fix

From: Shawn Starr <spstarr@sh0n.net>

opl3 use-after-free fix
parent 6e88ebdf
...@@ -440,9 +440,9 @@ int snd_opl3_create(snd_card_t * card, ...@@ -440,9 +440,9 @@ int snd_opl3_create(snd_card_t * card,
default: default:
opl3->command = &snd_opl2_command; opl3->command = &snd_opl2_command;
if ((err = snd_opl3_detect(opl3)) < 0) { if ((err = snd_opl3_detect(opl3)) < 0) {
snd_opl3_free(opl3);
snd_printd("OPL2/3 chip not detected at 0x%lx/0x%lx\n", snd_printd("OPL2/3 chip not detected at 0x%lx/0x%lx\n",
opl3->l_port, opl3->r_port); opl3->l_port, opl3->r_port);
snd_opl3_free(opl3);
return err; return err;
} }
/* detect routine returns correct hardware type */ /* detect routine returns correct hardware type */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment