]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
[media] drivers/media/video/atmel-isi.c: eliminate a null pointer dereference
authorJulia Lawall <julia@diku.dk>
Fri, 28 Oct 2011 22:58:16 +0000 (19:58 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 7 Nov 2011 15:12:24 +0000 (13:12 -0200)
commit0a4524d726cd4d109c57fc194a55ff0a9e4df0e9
tree5eca26e273476851caf0ed9a9a2706783ff964da
parent0d37d35035cb41f01e12082fa6b39a2e465ca4ba
[media] drivers/media/video/atmel-isi.c: eliminate a null pointer dereference

The variable isi might be null or might be freed at the point of the call
to clk_put.  pclk contains the value that isi->pclk is expected to point to.

The semantic match that finds this problem is as follows:

// <smpl>
@r@
expression E, E1;
identifier f;
statement S1,S2,S3;
@@

if (E == NULL)
{
  ... when != if (E == NULL || ...) S1 else S2
      when != E = E1
*E->f
  ... when any
  return ...;
}
else S3
// </smpl>

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