ALSA: echoaudio - Eliminate use after free
authorJulia Lawall <julia@diku.dk>
Fri, 2 Apr 2010 12:47:59 +0000 (14:47 +0200)
committerTakashi Iwai <tiwai@suse.de>
Sun, 4 Apr 2010 10:21:42 +0000 (12:21 +0200)
Use the call to snd_card_free in the error handling code at the end of the
function, as in the other error cases.

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

// <smpl>
@@
expression E,E2;
@@

snd_card_free(E)
...
(
  E = E2
|
* E
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

No differences found