]> git.karo-electronics.de Git - karo-tx-linux.git/commit
[media] drivers/media/video/cx231xx/cx231xx-cards.c: add missing kfree
authorJulia Lawall <julia@diku.dk>
Mon, 4 Jul 2011 14:11:41 +0000 (11:11 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 13 Jul 2011 22:49:43 +0000 (19:49 -0300)
commit331fd1db9d0535c0051ad9aa97503ed0a7902094
treeb6ace267cc8d218001021533f004e1f6848f107e
parentb161f1b7cc4eed89e24fe229239508660867023a
[media] drivers/media/video/cx231xx/cx231xx-cards.c: add missing kfree

Clear the cx231xx_devused variable and free dev in the error handling code,
as done in the error handling code nearby.

The semantic match that finds this problem is as follows:

// <smpl>
@r@
identifier x;
@@

kfree(x)

@@
identifier r.x;
expression E1!=0,E2,E3,E4;
statement S;
@@

(
if (<+...x...+>) S
|
if (...) { ... when != kfree(x)
               when != if (...) { ... kfree(x); ... }
               when != x = E3
* return E1;
}
... when != x = E2
if (...) { ... when != x = E4
 kfree(x); ... return ...; }
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx231xx/cx231xx-cards.c