kernel-fxtec-pro1x/sound/isa
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
..
ad1816a ALSA: snd-ad1816a: Implement suspend/resume 2012-08-20 11:12:56 +02:00
ad1848 ALSA: module_param: make bool parameters really bool 2011-12-19 10:34:41 +01:00
cs423x ALSA: module_param: make bool parameters really bool 2011-12-19 10:34:41 +01:00
es1688 ALSA: es1688 - freeup resources on init failure 2012-07-30 10:11:14 +02:00
galaxy ALSA: module_param: make bool parameters really bool 2011-12-19 10:34:41 +01:00
gus ALSA: print small buffers via %*ph[C] 2012-08-06 11:09:50 +02:00
msnd ALSA: module_param: make bool parameters really bool 2011-12-19 10:34:41 +01:00
opti9xx ALSA: sound/isa/opti9xx/miro.c: eliminate possible double free 2012-10-21 14:17:43 +02:00
sb sound: Remove unnecessary semicolon 2012-10-06 16:47:53 +02:00
wavefront sound: Remove unnecessary semicolon 2012-10-06 16:47:53 +02:00
wss ALSA: wss_lib: Fix resume on Yamaha OPL3-SAx 2012-07-16 11:24:05 +02:00
adlib.c ALSA: module_param: make bool parameters really bool 2011-12-19 10:34:41 +01:00
als100.c ALSA: snd-als100: fix suspend/resume 2012-08-21 07:29:40 +02:00
azt2320.c ALSA: module_param: make bool parameters really bool 2011-12-19 10:34:41 +01:00
cmi8328.c ALSA: cmi8328: Fix build error with CONFIG_GAMEPORT=n 2012-08-24 07:54:16 +02:00
cmi8330.c ALSA: module_param: make bool parameters really bool 2011-12-19 10:34:41 +01:00
es18xx.c ALSA: module_param: make bool parameters really bool 2011-12-19 10:34:41 +01:00
Kconfig ALSA: introduce snd-cmi8328: C-Media CMI8328 driver 2012-08-21 07:30:46 +02:00
Makefile ALSA: introduce snd-cmi8328: C-Media CMI8328 driver 2012-08-21 07:30:46 +02:00
opl3sa2.c ALSA: module_param: make bool parameters really bool 2011-12-19 10:34:41 +01:00
sc6000.c ALSA: module_param: make bool parameters really bool 2011-12-19 10:34:41 +01:00
sscape.c ALSA: sound/isa/sscape.c: add missing resource-release code 2012-04-10 08:42:07 +02:00