FIXED: "Trying to vfree() nonexistent vm area..." messages in sound driver(s).

Niels Kristian Bech Jensen (nkbj@image.dk)
Wed, 10 Dec 1997 14:20:12 +0100 (MET)


The cause of the messages is that parts of the sound_mem_blocks array are
vfree'd in opl3.c and uart401.c. The messages come when the whole array is
vfree'd in soundcard.c (line 464.) This patch solves the problem in a way
consistent with the rest of the sound driver(s).

diff -urN linux-2.1.72/drivers/sound/opl3.c linux/drivers/sound/opl3.c
--- linux-2.1.72/drivers/sound/opl3.c Fri Dec 5 11:11:22 1997
+++ linux/drivers/sound/opl3.c Wed Dec 10 13:34:26 1997
@@ -1204,7 +1204,6 @@
{
if (devc)
{
- vfree(devc);
devc = NULL;
sound_unload_synthdev(me);
}
diff -urN linux-2.1.72/drivers/sound/uart401.c linux/drivers/sound/uart401.c
--- linux-2.1.72/drivers/sound/uart401.c Wed Dec 10 08:55:42 1997
+++ linux/drivers/sound/uart401.c Wed Dec 10 13:48:25 1997
@@ -452,8 +452,8 @@
if (!devc->share_irq)
snd_release_irq(devc->irq);

- if (!devc)
- vfree(devc);
+ if (devc)
+ devc = NULL;
sound_unload_mididev(hw_config->slots[4]);
}

--
Med venlig hilsen / Best regards
                                                               nkbj@image.dk
Niels Kristian Bech Jensen                        http://www.image.dk/~nkbj/