linux/sound
Julia Lawall edb6689386 ALSA: sound/isa/opti9xx/miro.c: eliminate possible double free
snd_miro_probe is a static function that is only called twice in the file
that defines it.  At each call site, its argument is freed using
snd_card_free.  Thus, there is no need for snd_miro_probe to call
snd_card_free on its argument on any of its error exit paths.

Because snd_card_free both reads the fields of its argument and kfrees its
argments, the results of the second snd_card_free should be unpredictable.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier f,free,a;
parameter list[n] ps;
type T;
expression e;
@@

f(ps,T a,...) {
  ... when any
      when != a = e
  if(...) { ... free(a); ... return ...; }
  ... when any
}

@@
identifier r.f,r.free;
expression x,a;
expression list[r.n] xs;
@@

* x = f(xs,a,...);
  if (...) { ... free(a); ... return ...; }
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-21 14:17:43 +02:00
..
aoa sound/aoa: Adapt to new i2c probing scheme 2012-07-11 18:22:48 +10:00
arm ALSA: platform: Check CONFIG_PM_SLEEP instead of CONFIG_PM 2012-08-09 15:47:15 +02:00
atmel ALSA: sound/atmel/ac97c.c: fix error return code 2012-08-20 10:56:01 +02:00
core mm: kill vma flag VM_RESERVED and mm->reserved_vm counter 2012-10-09 16:22:19 +09:00
drivers ALSA: aloop - add locking to timer access 2012-10-06 16:50:28 +02:00
firewire IEEE 1394 (FireWire) subsystem updates post v3.4: 2012-05-24 12:57:47 -07:00
i2c Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-10-07 17:49:05 +09:00
isa ALSA: sound/isa/opti9xx/miro.c: eliminate possible double free 2012-10-21 14:17:43 +02:00
mips
oss ARM: SoC fixes 2012-10-11 10:21:48 +09:00
parisc
pci ALSA: hda - Fix silent headphone output from Toshiba P200 2012-10-20 18:20:55 +02:00
pcmcia ALSA: pdaudiocf: Remove superfluous pm_message_t argument from suspend 2012-07-03 08:23:08 +02:00
ppc ALSA: sound/ppc/snd_ps3.c: fix error return code 2012-08-20 11:01:14 +02:00
sh ALSA: Add missing .owner=THIS_MODULE to platform_driver definitions 2012-07-02 17:50:05 +02:00
soc ASoC: Fixes for v3.7 2012-10-17 14:09:15 +02:00
sparc sound: Remove unnecessary semicolon 2012-10-06 16:47:53 +02:00
spi ALSA: Convert at73c213 to module_spi_driver 2012-01-27 15:18:36 +01:00
synth
usb Sound updates #2 for 3.7-rc1 2012-10-12 12:31:28 +09:00
Kconfig
Makefile
ac97_bus.c
last.c ALSA: Remove the last mention of SNDRV_MAIN_OBJECT_FILE 2012-09-03 10:07:23 +02:00
sound_core.c sound: allow the unit search until 256 in sound_core.c 2012-05-08 17:27:03 +02:00
sound_firmware.c sound_firmware: don't pass crap to filp_close() 2012-07-29 21:24:22 +04:00